Android settings home screen application (desktop application)

First, the AndroidManifest.xmlinside activityof intent-filteradding the tag

<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>

2. Then manually set the default program (main screen setting) in the system settings, this step is not fixed:

  • The first case: there is no such setting at all! (It is recommended to struggle with the following process first, dear)
  • The second case: you need to install a program with the main screen function (that is, the code above), and trigger the pop-up window of the main screen program setting, the main screen setting option will appear in the setting interface.
  • The third case: There is this setting item by default, but it is hidden deeply. It is recommended to search for it in "Applications" and "Advanced/Other Settings", or search directly.
  • If the home screen application has not been set: you can click the home screen button or the remote control needs a key, and it will basically trigger the home screen program selection pop-up window. After double-clicking to enter the program that we need the main screen, click the main screen button again, there will be an "always option" after the second selection window pops up. But this operation may be invalid on some devices!

Guess you like

Origin blog.csdn.net/qq_36881363/article/details/106620048