Search code examples
notificationsnativescriptinteractivepersistent

Persistent notification with buttons in Nativescript


I want to do a notification that persists as long as I want it on the notification area, and I want to add buttons in it to control actions in my app when it is not visible. Something like this:

Persistent interactive notification

How can I do that in Nativescript?


Solution

  • Use nativescript-local-notifications plugin.

    tns plugin add nativescript-local-notifications
    
    • ongoing - flag enables you persistent notification
    • actions - let you add buttons