JavaScript Linq
JavaScript Linq

Reputation: 2805

How to show notification in notification area in Cordova?

How to send notification in notification area using Cordova without push-notification service like:

window.plugins.PluginName.Notify('Title','');

Upvotes: 0

Views: 981

Answers (1)

lifeisfoo
lifeisfoo

Reputation: 16344

You can use the Cordova local notifications plugin. Inside the documentation you can find everything you need to know; anyway this is an example code:

cordova.plugins.notification.local.schedule({
    id: 1,
    text: "Single Notification",
    sound: isAndroid ? 'file://sound.mp3' : 'file://beep.caf',
    data: { secret:key }
});

Upvotes: 1

Related Questions