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>
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With