sdphil wrote:
> I am trying to have some code execute every 24 hours.
> 
> I discovered this (great) thread --
> http://groups.google.com/group/android-developers/browse_thread/thread/947fd3d0ed878c66/52b1dbf583faeda2?lnk=gst&q=schedule+event#52b1dbf583faeda2
> 
> And looked at Mark Murphy's code --
> http://groups.google.com/group/cw-android/web/Alarm.zip
> 
> But my question has to do with how to trigger the service even if the
> phone has not been rebooted.  In other words, suppose someone installs
> my application.  I would like to make it so that in 24 hours, it
> executes some code, whether or not the phone has been rebooted.

Register your alarm when they first run the app. Set a flag (file,
shared preference, database) to let you know it was the first time you
were run.

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

Android 2.0 Programming 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