【问题标题】:How to Close Network Scan Search Screen Programatically in Intent Service(Android)如何在 Intent Service(Android) 中以编程方式关闭网络扫描搜索屏幕
【发布时间】:2015-01-30 06:24:58
【问题描述】:

实际上,我正在开发一个应用程序来以编程方式在 android 中搜索网络扫描。所以我使用下面的代码在 Intent Service 中以编程方式搜索,

Intent intent = new Intent();
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        intent.setAction("android.intent.action.MAIN");
        intent.setClassName("com.android.phone",
                "com.android.phone.NetworkSetting");
        startActivity(intent);

所以搜索网络扫描工作正常,但我的意图是关闭在 Intent 服务中打开“Com.android.phone.Network Setting”的屏幕。

请帮助我在一段时间后关闭打开的 Intent 或扫描完成。

【问题讨论】:

    标签: android android-intent intentservice activity-finish


    【解决方案1】:

    你不能。您无法控制其他应用程序。你可以启动它们,但你不能阻止它们。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-02-02
      • 2018-08-20
      • 2014-02-02
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多