On Tue, Nov 9, 2010 at 7:51 PM, Henrik Lindqvist
<henrik.lindqv...@gmail.com> wrote:
> I've got a IntentService started by an alarm. I also want it to start
> on other intents, like ACTION_TIME_CHANGED. Do I have to create an
> BroadcastReceiver that start the service when it receivers the
> TIME_SET intent, can't the service be started by the intent in the
> first place. I tried to add <service>/<intent-filter>/<action> but
> didn't work. Should it?

There are three "channels", if you will, on the Intent message bus:

-- starting activities (Activity)
-- starting services (Service)
-- sending broadcasts (BroadcastReceiver)

ACTION_TIME_CHANGED is a broadcast action (as indicated in the docs).
That can only be received by a BroadcastReceiver. It cannot be
received by a service.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android App Developer Books: http://commonsware.com/books

-- 
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

Reply via email to