- Home /
Local Notification on android and ios every 24 hours
Hello everyone,
I need to make a local notification for my game on android/ios devices that tells the user that he didn't play/open the game for 24 hours like "We missed you on the board!" or something.
I have searched about many plugins for unity to handle the local notifications but I wonder if the game in the background can calculate the time (for 24 hours) while it is not even running!!
So anyone has any idea about what shall I do?
And If there is anyone can give me an advice which plugin shall I use for the 'local notifications' on android/ios, I would be so grateful!
Thanks
Answer by $$anonymous$$ · Apr 16, 2015 at 03:29 PM
Why not use Unity's own
NotificationServices : http://docs.unity3d.com/ScriptReference/iOS.NotificationServices.html
LocalNotification : http://docs.unity3d.com/ScriptReference/iOS.LocalNotification.html
Just schedule a local notification OnApplicationPause (when exiting / pausing game) setting 'fireDate' to 24 hours in advance. And clear all local notifications when player resumes the game.
If you want to use plug-ins I recommend Prime31. I've used them in the past and they are quite good and reliable. Take a look at 'Etcetera' and 'Etcetera Two' plug-ins.
Please keep in mind that all the above only will work on iOS. For Android, you need to either buy a separate plug-in or find another way to do the same thing that unity allows it through their API
Hope this helps.
For Android Use Android Native Plugin which helps you in not only scheduling local notification but also In Google Cloud Notification aswell and many extraordinary features. Have a Try-Android Native Plugin Hope this helps
Your answer
Follow this Question
Related Questions
Push Notifications iOS & Android Vuforia & UrbanAirship 0 Answers
Reading notifications from Unity or knowing if notifications are enabled 0 Answers
Android & iOS Push Notifications 3 Answers
Local notification with closed app 3 Answers
Android/iOS notifications when the game is not running 1 Answer