Commit d8af1e9b authored by Sebastián Katzer's avatar Sebastián Katzer
Browse files

Merge pull request #66 from interFace-dk/ongoing_option

Added ongoing option (android only)
parents 0cc81a21 d06b1ad7
Loading
Loading
Loading
Loading
+1 −0
Changes for README.md: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -117,6 +117,7 @@ window.plugin.notification.local.add({
    sound:      String,  // A sound to be played
    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
    ongoing:    Boolean, // Prevent clearing of notification (Android only)
    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
});
+4 −0
Changes for src/android/Options.java: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -228,6 +228,10 @@ public class Options {
        return options.optBoolean("autoCancel", false);
    }

    public Boolean getOngoing() {
        return options.optBoolean("ongoing", false);
    }

    /**
     * Gibt die zusätzlichen Daten als String an.
     */
+2 −1
Changes for src/android/Receiver.java: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -130,7 +130,8 @@ public class Receiver extends BroadcastReceiver {
        .setSmallIcon(options.getSmallIcon())
        .setLargeIcon(icon)
        .setSound(options.getSound())
        .setAutoCancel(options.getAutoCancel());
        .setAutoCancel(options.getAutoCancel())
        .setOngoing(options.getOngoing());

        setClickEvent(notification);

+1 −0
Changes for www/local-notification.js: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ LocalNotification.prototype = {
            message:    '',
            title:      '',
            autoCancel: false,
            ongoing:    false,
            badge:      0,
            id:         '0',
            json:       '',