Notifications



Notifications: Unity (C#)




Local Notifications are reminders displayed on your mobile device's screen after the app becomes inactive.

1) Ask for local notifications permission:
FGLEnhance.RequestLocalNotificationPermission (OnPermissionGranted, OnPermissionRefused);
2) Enable a new local notification:
FGLEnhance.EnableLocalNotification ("title", "message", 5);
3) Disable the local notification:
FGLEnhance.DisableLocalNotification ();

Notifications: Android (Java)




Local Notifications are reminders displayed on your mobile device's screen after the app becomes inactive.

1) Set permission callbacks:
final PermissionCallback permissionCallback = new PermissionCallback() {
    @Override
    public void onPermissionGranted() {}

    @Override
    public void onPermissionRefused() {}
};
2) Ask for local notifications permission:
FglEnhance.requestLocalNotificationPermission(permissionCallback);
3) Enable a new local notification:
FglEnhance.enableLocalNotification("title", "message", 5);
4) Disable the local notification:
FglEnhance.disableLocalNotification();

Notifications: iOS (Objective-C)




Local Notifications are reminders displayed on your mobile device's screen after the app becomes inactive.

1) Ask for local notifications permission:
[[FglEnhance sharedInstance] requestLocalNotificationPermission:self];
2) Enable a new local notification:
[[FglEnhance sharedInstance] enableLocalNotificationWithTitle:@"title" message:@"message" delay:5];
3) Disable the local notification:
[[FglEnhance sharedInstance] disableLocalNotification];
4) Implement PermissionDelegate:
-(void)onPermissionGranted {}

-(void)onPermissionRefused {}

Notifications: OpenFL (Haxe)




Local Notifications are reminders displayed on your mobile device's screen after the app becomes inactive.

1) Ask for local notifications permission:
Enhance.requestLocalNotificationPermission(onPermissionGranted, onPermissionRejected);
2) Enable a new local notification:
Enhance.enableLocalNotification("title", "message", 5);
3) Disable the local notification:
Enhance.disableLocalNotification();

Notifications: Adobe Air (AS3)




Local Notifications are reminders displayed on your mobile device's screen after the app becomes inactive.

1) Ask for local notifications permission:
FglEnhance.requestLocalNotificationPermission(onPermissionGranted, onPermissionRefused);
2) Enable a new local notification:
FglEnhance.enableLocalNotification("title", "message", 5);
3) Disable the local notification:
FglEnhance.disableLocalNotification();

Notifications: Defold (Lua)




Local Notifications are reminders displayed on your mobile device's screen after the app becomes inactive. 1) Ask for local notifications permission:
FglEnhance.requestLocalNotificationPermission(permissionCallback);
2) Enable a new local notification:
enhance.enableLocalNotification("title", "message", 5)
3) Disable the local notification:
enhance.disableLocalNotification()

Notifications: Construct 2 (Visual)




Local Notifications are reminders displayed on your mobile device's screen after the app becomes inactive.

1) Actions
[Request Permission]
Ask for local notifications permission.
[Enable Local Notification]
Enable a new local notification.
[Disable Local Notification]
Disable any local notification. 2) Conditions
[On permission granted]
Triggered when permission to show local notifications is granted.
[On permission rejected]
Triggered when permission to show local notifications is rejected.
[Is permission granted]
Check whether the permission to show local notifications is granted.

Notifictions: Cordova (JS)




Local Notifications are reminders displayed on your mobile device's screen after the app becomes inactive.

1) Ask for local notifications permission:
Enhance.requestLocalNotificationPermission(onPermissionGranted, onPermissionRefused);
2) Enable a new local notification:
Enhance.enableLocalNotification('title', 'message', 5);
3) Disable the local notification:
Enhance.disableLocalNotification();

Notifications: Stencyl (Visual)




Local Notifications are reminders displayed on your mobile device's screen after the app becomes inactive.

1) Action Blocks
[request local notification permission]
Request a permission from the user to schedule local notifications.
[enable local notification with title: (text) message: (text) and delay: (number)]
Enable a new local notification.
[disable local notification]
Disable any local notification.

2) Wrapper Blocks
[on local notification permission granted]
Define actions which are triggered after the permission is granted.
[on local notification permission refused]
Define actions which are triggered after the permission is refused.