How do I make my application the default launcher?

I developed a launcher app, the first time I installed it on an Android system device, a selection dialog popup with two options, i.e. always and only once. I selected "Always", now my application becomes the default launcher, but the problem is when I update the application, the system opens the same selection dialog again, I don't want to show this popup. How to make an application a standard launcher? To achieve this, do I need to create a system-level application?

I used the following permission to make the application a launcher

<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.MONKEY" />
</intent-filter>

      

+3


source to share


1 answer


Custom settings cannot be changed. Google does not allow a developer to change user preferences.

A workaround can be helpful, you can check if your application is started by default when the service starts, and then prompts the user to be the default.



You can find out how to check if your application is a standard launcher from here (tried this, it works for me) or here

You can then prompt the user to select your application if it is not the default launcher. A workaround for this is provided here .

+4


source







All Articles