Commit 0c653b0a authored by Amit Davidi's avatar Amit Davidi

Fix nondistinct pending intent bug

parent aaf458f3
......@@ -8,12 +8,11 @@ import android.os.Bundle;
import com.wix.reactnativenotifications.core.notification.PushNotificationProps;
public class NotificationIntentAdapter {
private static final int PENDING_INTENT_CODE = 0;
private static final String PUSH_NOTIFICATION_EXTRA_NAME = "pushNotification";
public static PendingIntent createPendingNotificationIntent(Context appContext, Intent intent, PushNotificationProps notification) {
intent.putExtra(PUSH_NOTIFICATION_EXTRA_NAME, notification.asBundle());
return PendingIntent.getService(appContext, PENDING_INTENT_CODE, intent, PendingIntent.FLAG_ONE_SHOT);
return PendingIntent.getService(appContext, (int) System.currentTimeMillis(), intent, PendingIntent.FLAG_ONE_SHOT);
}
public static Bundle extractPendingNotificationDataFromIntent(Intent intent) {
......
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