如何彻底结束一个发射器?发射器、结束

2023-09-07 03:53:10 作者:总有太监想骚扰本宫

我的应用程序可以作为一个发射器。但是,我想我做错了什么通过它发射。例如,用户选择我的应用程序为默认启动(点击'总是')。然而,当用户从应用程序退出,它再次出现时,因为它是默认启动器。我怎样才能解决这个问题?

My application works as a launcher. But, I guess I did something wrong by making it a launcher. For instance, the user selects my application as Default Launcher (clicks 'Always'). However, when the user exits from the application, it appears again, because it's the default launcher. How can I fix it?

<activity
      android:name="com.comeks.cocuktablet.Main"
      android:label="@string/app_name"
      android:launchMode="singleInstance"
      android:screenOrientation="portrait" >
      <intent-filter>
           <action android:name="android.intent.action.MAIN" />

           <category android:name="android.intent.category.HOME" />
           <category android:name="android.intent.category.DEFAULT" />
           <category android:name="android.intent.category.LAUNCHER" />
      </intent-filter>
</activity>

在code来自我的清单。我也想让主要活动启动。

编辑:我意识到我的具体错误。我也写了code在引导时启动我的应用程序。问题是,当我关闭我的设备,然后再次打开它,我不能从中退出。

I realized my exact error. I also wrote a code to start my app on boot. The problem is that when I close my device and open it again, I cannot exit from it.

推荐答案

感谢您的所有答案。我通过调用Android的家庭发射而从应用程序退出解决了我的问题。

Thank you for your all answers. I solved my problem by calling Android's home launcher while exiting from app.