Notification Plugin

Schedule native local push notifications in your app.

Schedule Time-Based Reminders

Remind your users of events or appointments in your calendar or to-do app. Schedule a countdown and inform your users even if your app is in the background.

Increase User Retention

Schedule a local push notification which brings your users back into your app or game after a certain time of inactivity.


In comparison to server-side push notifications local notifications are triggered at a certain point of time. Local notifications are scheduled from within your app logic and therefore do not require any server-side logic for integration. Therefore they are ideally suited for applications with time-based behaviors, for example for apps like to-do list and calendar apps.

When scheduling a notification you specify a fire date at which the notification should be presented to the user. This can be either given as relative timestamp (Notification::timeInterval) or as an absolute UNIX timestamp (Notification::timestamp).

Note: iOS currently allows a maximum of 64 simultaneously scheduled notifications; the system keeps the soonest-firing notifications and discards all others.

As soon as the system delivers a local notification the NotificationManager::notificationFired signal is emitted in following cases:

  • If the app is currently in the foreground the signal is emitted immediately, there isn't however a sound played and no banner is displayed.
  • If the app is in the background the system plays a short notification sound and displays a banner with your provided message. If the user then taps the notification the app goes to the foreground and the signal is emitted. The system also sets the provided number on the app icon on iOS or in the notification area on Android, which gets cleared out again as soon as the user opens your app.

Use Cases

Local push notifications can be used for several use cases, here are some of them:

Timer-based Apps

A lot of apps notify users at a specific point of time about custom events or appointments. Such timer-based apps like to-do or calendar apps are ideally suited for local notification usage. As an example you can have a look at the Dynamic Notifications example, which shows how to schedule notificatins for a to-do app.

User Retention

You can bring your users back to your app after a certain amount of time of inactivity. As an example you can schedule an inactivity notification which gets triggered when a user does not open your app for more than 24 hours, like shown in the Static Notifications example below.

Example Usage

To try the Notification plugin and see an integration example have a look at the V-Play Plugin Demo app.

To use local notifications in your app you have to add a NotificationManager item somewhere in the top hierarchy of your QML code like in the example below:

 import QtQuick 2.1
 import QtQuick.Window 2.1

 import VPlayPlugins 1.0

 Window {
   NotificationManager {
     id: notificationManager

Depending on your use case you can then schedule notifications in one of the following ways:

Dynamic Notifications

Use NotificationManager::schedule to schedule a dynamically created notification from a map. Here is an example how to schedule a notification for a new to-do item in your to-do app:

 // This item represents the logic for managing to-do entries
 ToDoManager {

   onNewToDoItemAdded: {
      // Schedule notification from given toDoItem
      notificationManager.schedule({ message: toDoItem.title, timestamp: toDoItem.deadline })


Static Notifications

It's also possible to pre-define notifications as static QML items in your code and schedule them at given points of time. As an example we schedule an inactivity notification which gets triggered when a user does not open your app for more than 24 hours:

 import QtQuick 2.1
 import QtQuick.Window 2.1

 import VPlayPlugins 1.0

 Window {
   NotificationManager {
     id: notificationManager

   Notification {
     id: idleNotification

     notificationId: "idleNotification"
     message: "Anyone here? Haven't seen you in a while..."
     timeInterval: (24 * 60 * 60) // in seconds

   Component.onCompleted: {
     // Cancel old notification if scheduled
     // Schedule idleNotification

Note that this examples uses a pre-defined notification id, which we can use with property access later on during canceling an already scheduled notification.

Please also have a look at our plugin example project on GitHub:

Available QML Items


Item represents a single local notification which can be scheduled with the NotificationManager item


Item allows scheduling native local push notifications on iOS & Android


To use the Notification plugin you need to add the platform-specific native libraries to your project, described here:

iOS Integration Steps

No further steps to to.

Android Integration Steps

  1. Open your build.gradle file and add the following lines to the dependencies block:
     dependencies {
       compile 'net.vplay.plugins:plugin-notification:2.+'

    Note: If you did not create your project from any of our latest wizards, make sure that your project uses the Gradle Build System like described here.

Note: Make sure to set an app icon for your app in the AndroidManifest.xml file, as this one is used as default icon for a background notification.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
create apps
create games
cross platform
native performance
3rd party services
game network
level editor
easiest to learn
biggest time saving
best support