0

I am building a custom launcher (home screen) for Android 4.0+. Now I face an issue which is that I need user to setup a few things before they can use it as a custom launcher. That means that after initial setup, I need to register my app as custom launcher through code instead of through the manifest file. How do I go about this? It's clearly possible since Yahoo Aviate can do just that.

2
  • Just Create a temp Activity than take some input and store in database and secand time check value stored in database r not if data inserted than open lancher outher wise open dumy activity on your app Sep 4, 2014 at 11:44
  • It was my fault that I didn't say that I was developing Android custom launcher (home screen app), not a regular app. So what I meant was that I needed to register my app as a custom launcher through code instead of through AndroidManifest.xml file.
    – imgen
    Sep 4, 2014 at 11:47

1 Answer 1

1

I needed to register my app as a custom launcher through code instead of through AndroidManifest.xml file

That is not strictly possible. You have to have the MAIN/HOME <intent-filter> in the manifest.

You are welcome to have that activity be disabled initially, via android:enabled="false" on the <activity> element. Then, when you are ready for the home screen to be usable, use PackageManager and setComponentEnabledSetting() to make the activity be enabled, after which the user can choose to use it as their home screen.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.