Use independent BroadcastReceiver objects, each with its own IntentFilter. Normally, this would not be needed, but few applications require the dynamic add/remove receiver support that you're seeking.
On Fri, Jul 1, 2011 at 8:15 AM, Sreekanth Rao <dns...@gmail.com> wrote: > Hi, > > I'm working on a service which receives multiple intents and > processes it. Dynamically Intents can be enabled or disabled. > > I have a single broadcast receiver which is listening to all the > intents. > > When an Intent is enabled, I'm registering that intent filter with > the receiver, but when a Intent is disabled, there is no way of > unregistering a single intent from the broadcast receiver. > > As of now I'm unregistering the broadcast receiver and again > registering all other intents to broadcast receiver. I feel this is > not a good approach to do it. Please suggest me a better way to > disable the intent filter from a broadcast receiver > > Regards > > Sreekanth > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 3.5 Available! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en