Integrate with Enhance - Unity
Local Notifications
Local Notifications are reminders which show up on your screen after the app becomes inactive for a specific amount of time.
Example Usage
private void OnPermissionGranted() { // Success Enhance.EnableLocalNotification("Game", "Play me!", 60); } private void OnPermissionRefused() { // Failure }
Methods
Enhance.RequestLocalNotificationPermission
void Enhance.RequestLocalNotificationPermission(
Action onPermissionGrantedCallback,
Action onPermissionRefusedCallback
)
Parameters:
Action onPermissionGrantedCallback
- Called when a permission to schedule local notifications is granted or not required.
Action onPermissionRefusedCallback
- Called when a permission to schedule local notifications is refused. Trying to enable a notification will not have any effect.
Enhance.EnableLocalNotification
void Enhance.EnableLocalNotification(
string title,
string message,
int delay
)
Parameters:
string title
- Title (header) of the notification.
string message
- Message (body) of the notification.
int delay
- Delay of the notification (how long to wait after app becomes inactive). Use seconds.