How to send notifications while the game is closed?
Dear, how can I send notifications when my game is closed? Thanks
Answer by EDevJogos · Nov 25, 2017 at 03:23 PM
For Android you can use this asset, will send any schedule notification even if the app is closed:
https://assetstore.unity.com/packages/tools/integration/simple-android-notifications-free-68626
IOS the built-in works fine: using UnityEngine.iOS;
UnityEngine.iOS.LocalNotification __notification = new UnityEngine.iOS.LocalNotification();
__notification.alertAction = "Notification";
__notification.alertBody = "My notification";
__notification.fireDate = /*the date*/;
UnityEngine.iOS.NotificationServices.ScheduleLocalNotification(__notification);
Answer by hassanayoub1985 · Nov 25, 2017 at 03:29 PM
perfect what about ios?
That's IOS code is there no plug-in needed is built-in Unity already. The Android code i recommend for you to read the asset documentation but it's basically:
using Assets.SimpleAndroidNotifications; //have this
Notification$$anonymous$$anager.Send(/*time*/, /*Alert*/, "$$anonymous$$essage", /*text color*/));
Thanks alot. Any example how to do this on iOS too?
Your answer
Follow this Question
Related Questions
Should I leave space for Ad's while designing my game?Also how are they implemented? 0 Answers
How to get the decibel level of a mobile micro (Android/iOS) 0 Answers
ARCore compatibility with iOS platform 2 Answers
Is it possible to access the native step-counter on mobile platforms. 2 Answers
*SOLVED* Error writing to IOS file system works on android & editor 1 Answer