android: choose default launcher programmatically

Try using the following: Intent startMain = new Intent(Intent.ACTION_MAIN); startMain.addCategory(Intent.CATEGORY_HOME); startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(startMain); If a default action is already set (yours), you can call first: getPackageManager().clearPackagePreferredActivities(getPackageName()); If the default action is not yours, you cannot clear it programmatically, what you can do is to check if other app is set as default and show a message.. … Read more