sudodev
sudodev

Reputation: 353

Prevent dismiss notification - Cordova

Is there a way to show a fixed notification, like Android update notification, forcing user to click on it ?

Because If user dismiss the notification and open the application later, all data is gone.

Upvotes: 1

Views: 347

Answers (1)

chatpitau
chatpitau

Reputation: 1303

With the plugin cordova-plugin-local-notifications you can show persistent notifications.

By using this code :

cordova.plugins.notification.local.schedule({
    text: "Persistent Notification",
    ongoing: true,
    ...
});

Plugin doc

Upvotes: 1

Related Questions