Reputation:
How can I get a list of Default applications in Android devices programmatically?
For example, in my phone there may be two Video player.
But it is quite possible that VLC is set as default player. Like this, I want to find programatically all the Default applications. I have been able to get list of Installed applications and Launcher applications but how could I find list of all default applications.
Upvotes: 2
Views: 1747
Reputation: 855
You can use getPreferredActivities()
like this:
List<IntentFilter> filters = new ArrayList<IntentFilter>();
List<ComponentName> activities = new ArrayList<ComponentName>();
getPackageManager().getPreferredActivities(filters, activities, null);
This will put all default activities in the list called activities
.
Upvotes: 2