Android: How to convert my regular Android app to Android Launchher app?

I have created my android app that shows all installed apps, widgets, now I can run this app via android by default, but how can I run it as a launcher.

any suggestions?

+3


source to share


2 answers


You can specify a category android.intent.category.HOME

for your activity tag in the manifest file whose activity you want to launch as a launch activity, for example -

<activity android:name="com.domain.youractivityname">
      <intent-filter>
           <action android:name="android.intent.action.MAIN" />
           <category android:name="android.intent.category.LAUNCHER" />
           <category android:name="android.intent.category.HOME" />
      </intent-filter>
</activity>

      



Hope this helps. thank.

+5


source


You need to specify the HOME category in your manifest, for example:



<intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.HOME" />
</intent-filter>

      

+2


source







All Articles