Commit 64b38b60 by Sebastián Katzer

Each pending request needs a unique request code

parent bffc9d28
......@@ -22,6 +22,7 @@
package de.appplant.cordova.plugin.localnotification;
import java.util.Calendar;
import java.util.Random;
import org.json.JSONException;
import org.json.JSONObject;
......@@ -135,7 +136,9 @@ public class Receiver extends BroadcastReceiver {
.putExtra(OPTIONS, options.getJSONObject().toString())
.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
PendingIntent contentIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT);
int requestCode = new Random().nextInt();
PendingIntent contentIntent = PendingIntent.getActivity(context, requestCode, intent, PendingIntent.FLAG_CANCEL_CURRENT);
return notification.setContentIntent(contentIntent);
}
......
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