ποΈNotification Manager
Notification Manager handles only Android notifications
How it's work
namespace using Game.Core;
It inits in AppStart.cs in Start(). Object with script replaced in _Loader scene.
Manager schedules notifications by SendScheduledNotification_GameReturn(here will be fire delays and hours args) function.
You need to change fire delays and hours args if you want in that function by script edit.
In init it will schedule notifications. No more functionality yet.
You must setup some field for every game if you want to use notifications. You can find all that you need to change by todo list in Visual Studio or other IDE. code below what you need to change:
// todo: NOTIFICATION change title, text, icon and etc!
private NotificationData[] gameReturnNotifications = new NotificationData[] {
new NotificationData() {
Title = "Figures are waiting!",
Text = "Figures are waiting for you!",
HasIcons = true,
//
SmallIcon = "figure_square",
LargeIcon = "figure_square_large"
},
};
// todo: NOTIFICATION change waitDaysCount, fireHourFirst,
// fireHourSecond, repeatIntervalDays default params
private void SendScheduledNotification_GameReturn(
int waitDaysCount = 2, int fireHourFirst = 12,
int fireHourSecond = 18, int repeatIntervalDays = 1);Last function in code above is core setup of scheduled notifications, their invoke time.
Last updated