Selaa lähdekoodia

Merge branch 'master' of github.com:katzer/cordova-plugin-local-notifications

Sebastián Katzer 12 vuotta sitten
vanhempi
commit
448b220d13
3 muutettua tiedostoa jossa 13 lisäystä ja 5 poistoa
  1. 3 3
      README.md
  2. 7 0
      src/android/Options.java
  3. 3 2
      src/android/Receiver.java

+ 3 - 3
README.md

@@ -51,10 +51,10 @@ More informations can be found [here](https://build.phonegap.com/plugins/413).
 
 #### Version 0.7.0 (22.01.2014)
 **Note:** The new way of callback registration will be not compatible with previous versions! See #62
-- [feature:] Added new callback registration interface and new callback types.
+- **[feature:]** Added new callback registration interface and new callback types.
 - [feature:] Added the ability to override notifications default properties.
 - [bugfix:] Fixed build failure if iOS/MacOS/Xcode were to old (#68).
-- [chance] The message and not the title will be used as the ticker text.
+- **[change]** The message and not the title will be used as the ticker text.
 
 #### Version 0.7.0beta1 (17.01.2014)
 - [bugfix:] App throws an error on iOS if `message` is null.
@@ -64,7 +64,7 @@ More informations can be found [here](https://build.phonegap.com/plugins/413).
 - [bugfix:] `cancel` on iOS did not work.
 - [enhancement:] Added 'hourly' as a new repeat time aliase.
 - [enhancement:] Repeat with custom intervals on Android.
-- **[bugfix:]** Callbacks are called with the ID as a number and not as a string.
+- **[change:]** Callbacks are called with the ID as a number and not as a string.
 - [enhancement:] The background callback on Android is called, even the app is not running when the notification is tapped.
 - [enhancement:] Notifications are repeated more precisely.
 - [feature:] Added `json` property to pass custom data through the notification.

+ 7 - 0
src/android/Options.java

@@ -214,6 +214,13 @@ public class Options {
         return options.optBoolean("autoCancel", false);
     }
 
+    /**
+     *
+     */
+    public Boolean getOngoing () {
+        return options.optBoolean("ongoing", false);
+    }
+
     /**
      * Gibt die zusätzlichen Daten als String an.
      */

+ 3 - 2
src/android/Receiver.java

@@ -126,7 +126,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);
 
@@ -176,4 +177,4 @@ public class Receiver extends BroadcastReceiver {
     private void fireTriggerEvent () {
         LocalNotification.fireEvent("trigger", options.getId(), options.getJSON());
     }
-}
+}