Reputation: 3541
Is there a way i can get intent filters supported by an app by using PackageManager.GET_INTENT_FILTERS option since i can't find a method that returns packageinfo instance?
List<ResolveInfo> launchables=pm.queryIntentActivityOptions(this.
getComponentName(),
new Intent[]{intent1},intent2,
PackageManager.GET_INTENT_FILTERS);
for( ResolveInfo lauchable : launchables){
ActivityInfo activity=launchable.activityInfo;
ComponentName name=new ComponentName(activity.applicationInfo.packageName,
activity.name);
IntentFilter filter = launchable.filter;
PackageInfo info = launchable.//i can't find a method that return
//PackageInfo instance in this lauchable.
}
Upvotes: 2
Views: 2234
Reputation: 158
I'm trying to do the same but for what I found until now it's quite impossible retrieve a complete list of Intent Filters from an app installed on a device. In particular, the GET_INTENT_FILTERS seems to be buggy. On this link it is specified the situation about this option.
Upvotes: 1