Android: Can I enable/disable an activity's intent filter programmatically?
Solution 1:
You can't do this directly, but you can create an activity alias in your AndroidManifest.xml
with the intent filter in question, and then enable or disable the alias using PackageManager#setComponentEnabledSetting()
, leaving your other intent filters in the main copy of the Activity so they won't be affected.