Commit d8af1e9b by Sebastián Katzer

Merge pull request #66 from interFace-dk/ongoing_option

Added ongoing option (android only)
parents 0cc81a21 d06b1ad7
...@@ -117,6 +117,7 @@ window.plugin.notification.local.add({ ...@@ -117,6 +117,7 @@ window.plugin.notification.local.add({
sound: String, // A sound to be played sound: String, // A sound to be played
json: String, // Data to be passed through the notification json: String, // Data to be passed through the notification
autoCancel: Boolean, // Setting this flag and the notification is automatically canceled when the user clicks it autoCancel: Boolean, // Setting this flag and the notification is automatically canceled when the user clicks it
ongoing: Boolean, // Prevent clearing of notification (Android only)
foreground: String, // A javascript function to be called if the app is running foreground: String, // A javascript function to be called if the app is running
background: String, // A javascript function to be called if the app is in the background background: String, // A javascript function to be called if the app is in the background
}); });
......
...@@ -228,6 +228,10 @@ public class Options { ...@@ -228,6 +228,10 @@ public class Options {
return options.optBoolean("autoCancel", false); return options.optBoolean("autoCancel", false);
} }
public Boolean getOngoing() {
return options.optBoolean("ongoing", false);
}
/** /**
* Gibt die zusätzlichen Daten als String an. * Gibt die zusätzlichen Daten als String an.
*/ */
......
...@@ -130,7 +130,8 @@ public class Receiver extends BroadcastReceiver { ...@@ -130,7 +130,8 @@ public class Receiver extends BroadcastReceiver {
.setSmallIcon(options.getSmallIcon()) .setSmallIcon(options.getSmallIcon())
.setLargeIcon(icon) .setLargeIcon(icon)
.setSound(options.getSound()) .setSound(options.getSound())
.setAutoCancel(options.getAutoCancel()); .setAutoCancel(options.getAutoCancel())
.setOngoing(options.getOngoing());
setClickEvent(notification); setClickEvent(notification);
......
...@@ -36,6 +36,7 @@ LocalNotification.prototype = { ...@@ -36,6 +36,7 @@ LocalNotification.prototype = {
message: '', message: '',
title: '', title: '',
autoCancel: false, autoCancel: false,
ongoing: false,
badge: 0, badge: 0,
id: '0', id: '0',
json: '', json: '',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment