Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reading value of android:scheme programmatically

I want to know if it is possible to read the value of android:scheme from the Android-manifest-file (example below) programmatically.

<intent-filter>
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
    <data android:scheme="zxtest" />
</intent-filter>
like image 519
Sascha Möllering Avatar asked Jan 29 '13 15:01

Sascha Möllering


1 Answers

You should be able to get this information from the PackageManager:

PackageManager pm = getPackageManager();
ActivityInfo activityInfo = pm.getActivityInfo(component,
        PackageManager.GET_INTENT_FILTERS);

Unfortunately, however, you can't :-( This call SHOULD return the intent filters (according to the documentation), but it seems that the Android developers haven't gotten around to actually implementing it yet :-(

See Unable to get intent filters from a package

like image 119
David Wasser Avatar answered Nov 07 '22 02:11

David Wasser