Jake,
PendingIntents are not limited to launching activites. When a
PendingIntent fires, it just fires - the results of it firing depend on
how the PI was created.
If it's a broadcast event, it can be handled anywhere, and depends on
where / how a handler for this broadcast event is defined.
The easiest thing is to add a handler for this event to your
AppWidgetProvider, this can be done in the manifest (since AWP is a
BroadcastListener). Then, if building an widget update is not instant,
use a Service to built it.
-- Kostya
30.06.2010 23:41, Jake Colman пишет:
I would like my appwidget to get updates upon a change of location but I
have a few questions.
1) I start a service in the appwidget's onUpdate() method. Is it
appropriate to have location updates processed by the same service?
2) When using requestLocationUpdates() am I better off to use the
Listener form of the API or the PendingIntent form of the API? To
use the PendingIntent, I need to have an Activity, correct? And in
this instance I don't, correct? So can the Service class create and
use a Listener?
Thanks.
--
Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com
--
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en