Skip to content Skip to sidebar Skip to footer

How To Trigger App Function With Specific Time In Android?

I have create an app, and I set a datetime value, when hits the datetime value, the app will trigger the function on Android phone background. Any idea?

Solution 1:

You need to setup the Alarm and Receiver for it. http://developer.android.com/reference/android/app/AlarmManager.html

For example: http://www.techrepublic.com/blog/android-app-builder/use-androids-alarmmanager-to-schedule-an-event/

Solution 2:

Solution 3:

Good answers from @jcage and @goodm. Just a hint: Don't forget to reset Alarm at device boot via a ACTION_BOOT_COMPLETED receiver in manifest. http://developer.android.com/reference/android/content/Intent.html#ACTION_BOOT_COMPLETED

Post a Comment for "How To Trigger App Function With Specific Time In Android?"