0

If I store a specific time (a stringified Date object in localStorage perhaps, or some equivalent local persistent storage facility on the native device… I'm new to this so I'm not sure what is best yet, and any suggestions would be appreciated!), how can I trigger an alert (vibration, noise, push notification) to iOS or Android at that specific time?

I'm trying to make an alarm-clock type application that notifies the user each specific time stored in a local storage facility. Maybe there is even a way to simply say, “Push a notification at 11:00 am” or something like that. I'm working with Appgyver which uses PhoneGap and Cordova technologies, and I'm trying to build an app using Angular.js for iOS and Android. Thank you in advance!

roscioli
  • 1,200
  • 3
  • 15
  • 33
  • What you probably want is AlarmManager: https://developer.android.com/reference/android/app/AlarmManager.html. I'm not sure what the equivalent is when using phonegap. – Karakuri Sep 29 '14 at 15:31

2 Answers2

0

you must use android services for keep codes running even when your app is closed. i think this answer is for you: creating-an-android-service-with-phonegap-have-phonegap-app-run-even-when-close

Community
  • 1
  • 1
0

You could schedule a push notification from your backend. In-app push notifications are not yet supported on AppGyver, but push notifications from the network can be used with https://github.com/AppGyver/PushNotifications

Petrus Repo
  • 942
  • 9
  • 20