How to add or remove intent filter programmatically in android?

dhaval picture dhaval · Feb 1, 2011 · Viewed 11.4k times · Source

Is it possible to remove intent filters from activity based on user preference? Say dial intent filter is added and then at later point of time user decides the application should not handle dial.

Edit: Removed add part in question description

Answer

Will Tate picture Will Tate · Feb 1, 2011

No, it seems they are static.

An intent filter is an instance of the IntentFilter class. However, since the Android system must know about the capabilities of a component before it can launch that component, intent filters are generally not set up in Java code, but in the application's manifest file (AndroidManifest.xml) as elements.

Source: http://developer.android.com/guide/topics/intents/intents-filters.html#ifs