Context from which to initiate Service via Alarm Manager; Application Model Questions

by 3D » Fri, 31 Oct 2008 07:44:37 GMT


Sponsored Links
 I've created a simple app. to help me better understand a few key
components in the real app I'm making.  A snippet of what I've done:

- an Activity is launched (lets call it the Home Activity) -> from
here I schedule an alarm -> the alarm sets off a Pending Intent that
starts a Service.

- the above steps appear to do what I want them to do.

My questions:

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

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

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

I think that sums up my questions for now.  Advice will be greatly
appreciated!

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. OOT: add mypin kalo mau

Karena ketidakstabilan sinyal yg makin menjadi...kindly add mypin spy ane
bisa tetep tanya2 ya heheheh
mypin: 20EA94E0

Thks

-- 
"Indonesian Android Community [id-android]" 

2. aidl interface - why can't I use 'ContentValues' in the interface

I am trying to use class android.content.ContentValues in an aidl
interface.  Since this class implements parcelable, it is my
understanding that I SHOULD only have to import it into the aidl.
However, this is not working and I've tried a number of variations.
The rest of the aidl interface works & compiles fine, so this is
something particular to getting aidl to recognize a parcelable class.

Regards,

Fred

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. Nexus one display dirty secret :)

4. Is it possible to download and run android market applications on the emulator

5. Is it possible to download and run android market applications on the emulator

6. Adding custom view class to ContentView

7. Reg Android source and Eclipse CDT