TacB0sS
TacB0sS

Reputation: 10266

Clear Home Launcher default value

I've read a lot of question about how to set a launcher application as the default one.

I want to accomplish the opposite, assuming I have a launcher application, and that it has been set to default by the user, is there a way to clear my application from been the default one, without uninstalling the application?

Upvotes: 1

Views: 537

Answers (1)

ObieMD5
ObieMD5

Reputation: 2657

You can use public abstract void clearPackagePreferredActivities from PackageManager

use:

PackageManager pm = getPackageManager();
pm.clearPackagePreferredActivities("your.package.name");

You can only clear the packages assigned to your application.

Reference

Upvotes: 1

Related Questions