ソースを参照

Fixes #710 crash due to >500 notifications

Sebastián Katzer 10 年 前
コミット
a65f48c501
2 ファイル変更3 行追加2 行削除
  1. 1 0
      CHANGELOG.md
  2. 2 2
      src/android/notification/Builder.java

+ 1 - 0
CHANGELOG.md

@@ -4,6 +4,7 @@ ChangeLog
 Please also read the [Upgrade Guide](https://github.com/katzer/cordova-plugin-local-notifications/wiki/Upgrade-Guide) for more information.
 
 #### Version 0.8.3 (not yet released)
+- Fixed #710 crash due to >500 notifications (Android)
 - Fixed crashing `get(ID)` if notification doesn't exist
 
 #### Version 0.8.2 (08.11.2015)

+ 2 - 2
src/android/notification/Builder.java

@@ -162,7 +162,7 @@ public class Builder {
                 .putExtra(Options.EXTRA, options.toString());
 
         PendingIntent dpi = PendingIntent.getBroadcast(
-                context, 0, deleteIntent, PendingIntent.FLAG_CANCEL_CURRENT);
+                context, 0, deleteIntent, PendingIntent.FLAG_UPDATE_CURRENT);
 
         builder.setDeleteIntent(dpi);
     }
@@ -186,7 +186,7 @@ public class Builder {
         int requestCode = new Random().nextInt();
 
         PendingIntent contentIntent = PendingIntent.getActivity(
-                context, requestCode, intent, PendingIntent.FLAG_CANCEL_CURRENT);
+                context, requestCode, intent, PendingIntent.FLAG_UPDATE_CURRENT);
 
         builder.setContentIntent(contentIntent);
     }