Search code examples
androidservicepush-notificationalarm

How to set alarm or push notification


I am trying to make a reminder application on Android. I have taken data from the user and saved in a database. How do I trigger an alarm or push notification on user entered date?


Solution

  • To create push notification, you have to register on console API. but I can't post link , because of low reputation and get your own key. Personally I used this tutorial to create and handle push notification. http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/ but I can't understand why do you need it to alarm user. To implement alarm after some elapsed time, you can create Service: http://developer.android.com/reference/android/app/Service.html There you can create your own alarm or use one of the standard. Sorry, I can't provide code example, because your question is too general.