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.

This manifest entry handles the case where the device is rebooted --
                        <receiver android:name=".OnBootReceiver">
                                        <intent-filter>
                                                        <action 
android:name="android.intent.action.BOOT_COMPLETED" />
                                        </intent-filter>
                        </receiver>

And obviously, if the phone has been rebooted, and my app is being run
at the time the alarm expires, I don't want two broadcast receivers to
be triggered.

ideas?

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