Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!
The NotificationManager item allows scheduling native local push notifications on iOS & Android. More...
Import Statement: | import Felgo 3.0 |
Inherits: |
For more information also have a look at Notification Plugin.
This handler is called whenever a notification was fired. The provided notificationId
parameter describes the fired notification. You can use the parameter to decide further actions in your app, e.g. to
display a pop-up or navigate to another screen.
Example:
NotificationManager { onNotificationFired: { console.debug("Notification with id", notificationId, "fired") } }
See also schedule and scheduleNotification.
Call this function to cancel all currently scheduled notifications for your app.
See also cancelNotification.
Call this method to cancel the scheduled notification identified by the given notificationId
. The notificationId
can either be retrieved from a statically created Notification item or cached from a dynamically scheduled one.
See also cancelAllNotifications.
string schedule(params) |
Dynamically schedules a local notification for delivery at a given point of time. The params
map parameter expects the keys as in the Notification item. The return value
is the notification's notificationId
which is either set directly in the notification or randomly created during scheduling.
Example:
// Trigger notification in 8 seconds var notificationId = notificationManager.schedule({ message: "Hi Felgo", number: 1, timeInterval: 8 })
Please also have a look at the Notification Plugin#Example Usage.
See also scheduleNotification and notificationFired.
string scheduleNotification(notification) |
Schedules a given Notification item for delivery at a given point of time. The return value is the notification's notificationId
which is either set directly in the notification or randomly created during
scheduling.
Example:
Notification { id: staticNotification notificationId: "static_notification" message: "I'm statically defined in the app" timeInterval: 10 Component.onCompleted: { // Trigger notification in 10 seconds notificationManager.scheduleNotification(staticNotification) } }
Please also have a look at the Notification Plugin#Example Usage.
See also schedule and notificationFired.