문제

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?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top