On Oct 30, 1:52 pm, 3D <[EMAIL PROTECTED]> wrote: > - is a scheduled alarm persistent with respect to its creating process > (I believe so) ? If the Home Activity is destroyed, the alarm still > goes off, correct?
Correct. > - the PendingIntent that the alarm calls as well as the Intent nestled > within both have a Context of the Home Activity. Is this a problem? > Does the system launch the Home Activity again (if it has been > destroyed since scheduling the alarm) just to launch the Service? Neither PendingIntent nor Intent have a Context. They are just static data structures. (Well PendingIntent has an object reference to the server-side object representing it, but this is much lower-level than Context.) So the activity is not started again, it is just as if the alarm manager called startService() with the given PendingIntent, but doing it under your identity. > - the Service does its task (some networking which will take a couple > seconds) and then possibly creates a notification before killing > itself (the alarm is repeating so it will get called again later). > Does the Service need to make a new Thread to do its work in? The > user is not interacting with the Home Activity at this point so I > don't think a new Thread is needed. You need to make a new thread if you are going to do long-running (short running been measured in milliseconds) or blocking operations, since its onStart() etc methods are called on the main thread. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

