// Call by main game OnApplicationPause
public void ScheduleReturnBackToGameNotification()
{
#if UNITY_ANDROID
NotificationParams notification = new NotificationParams
{
Id = NotificationIdHandler.GetNotificationId(),
Ticker = "Ticker",
Sound = true,
Vibrate = true,
Light = true,
LargeIcon = "app_icon",
SmallIcon = NotificationIcon.Heart,
SmallIconColor = new Color(0, 0.5f, 0),
CallbackData = "ScheduleReturnBackToGameNotification", // name of method
Delay = TimeSpan.FromSeconds(inactiveLatelyNotificationDelayInSeconds),
Title = androidAppTitle,
Message = inactiveLatelyMessage
};
NotificationManager.SendCustom(notification);
#elif UNITY_IOS
LocalNotification notification = new LocalNotification
{
applicationIconBadgeNumber = 1,
alertBody = inactiveLatelyMessage,
fireDate = DateTime.Now.AddSeconds(inactiveLatelyNotificationDelayInSeconds),
soundName = LocalNotification.defaultSoundName
};
NotificationServices.ScheduleLocalNotification(notification);
#endif
}