Re: [android-developers] Multiple IntentServices for one Intent
Sorry you can't. You should basically never call startService() or bindService() with an implicit intent; you will get essentially random behavior in the service that is found if there are multiple services that match the intent. On Wed, May 16, 2012 at 9:32 PM, phoku mboeh...@fh-muenster.de wrote: Hi! I want to have multiple IntentServices listening to the same action getting fired when I call context.startService(...). How can I do that? Currently only one out of some IntentServices receives the Intent. -- 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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
Re: [android-developers] Multiple IntentServices for one Intent
so, is there kind of a best practice so solve this? On May 16, 2012 11:24 PM, Dianne Hackborn hack...@android.com wrote: Sorry you can't. You should basically never call startService() or bindService() with an implicit intent; you will get essentially random behavior in the service that is found if there are multiple services that match the intent. On Wed, May 16, 2012 at 9:32 PM, phoku mboeh...@fh-muenster.de wrote: Hi! I want to have multiple IntentServices listening to the same action getting fired when I call context.startService(...). How can I do that? Currently only one out of some IntentServices receives the Intent. -- 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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 -- 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
Re: [android-developers] Multiple IntentServices for one Intent
On Thu, May 17, 2012 at 2:26 AM, Matthias Böhmer matboeh...@googlemail.com wrote: so, is there kind of a best practice so solve this? You would start by explaining why you want to have multiple IntentServices listening to the same action getting fired when I call context.startService(...). Otherwise, either have one IntentService, or if the issue is multiple threads, have one Service with your own thread pool. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.7 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
Re: [android-developers] Multiple IntentServices for one Intent
On Wed, May 16, 2012 at 11:26 PM, Matthias Böhmer matboeh...@googlemail.com wrote: so, is there kind of a best practice so solve this? Er... the best practice is to be explicit about the service component you want to interact with. If you just want to blast this to all services, then you could do something like query the package manager for the services matching the intent and call startService() for each one at a time... but at this point I'd really have to ask, why are you not just doing this with a broadcast? -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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