I want to save default action chosen by user on clicking checkbox after launching available applications using ResolverActivity.java. I have gone through ResolverActivity.java, below chunk of code does get execute but still the default action is not saved. And next time i need to choose action/application all over again.
Code :
getPackageManager().addPreferredActivity(filter, bestMatch, set,
intent.getComponent());
Can anybody tell me whats the reason behind this code not working.