Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I programmatically set the default launcher app? [duplicate]

Possible Duplicate:
Android: change default Home Application

I want to create a program like "Home Switcher" that can programmatically set the default launcher. I have no code written yet but can kind of figure out how to find the available launcher apps, but I have no idea how to programmatically set the default. Can anyone point me in the right direction?

like image 336
Aerik Avatar asked Oct 12 '12 18:10

Aerik


1 Answers

This is not possible, except perhaps via some security flaw. I will look into it and try to get this flaw fixed, assuming that this app actually works.

Rooted devices should be able to do this, but not unrooted ones.


UPDATE

These apps do not actually set the default home, near as I can tell. They are simply calling startActivity() with a MAIN/LAUNCHER Intent, using createChooser() to force a chooser dialog to appear, giving the user the opportunity to choose a home screen and make it the default. This is perfectly legitimate, as it requires user involvement in the process.

Leastways, three of them work this way, while one simply crashes when trying to set a home screen.

like image 69
CommonsWare Avatar answered Nov 15 '22 00:11

CommonsWare