Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Commit 1db692b

Browse files
committed
Fix bug with action, only last action was notified.
1 parent 4f685aa commit 1db692b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotificationActions.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ public class RNPushNotificationActions extends BroadcastReceiver {
2121
public void onReceive(final Context context, Intent intent) {
2222
String intentActionPrefix = context.getPackageName() + ".ACTION_";
2323

24-
Log.i(LOG_TAG, "RNPushNotificationActions loading action");
24+
Log.i(LOG_TAG, "RNPushNotificationBootEventReceiver loading scheduled notifications");
25+
26+
if (null == intent.getAction() || !intent.getAction().startsWith(intentActionPrefix)) {
27+
return;
28+
}
2529

2630
final Bundle bundle = intent.getBundleExtra("notification");
2731

android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotificationHelper.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,7 @@ public void sendToNotificationCentreWithPicture(Bundle bundle, Bitmap largeIconB
545545

546546

547547
Intent actionIntent = new Intent(context, RNPushNotificationActions.class);
548+
actionIntent.setAction(packageName + ".ACTION_" + i);
548549

549550
actionIntent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
550551

0 commit comments

Comments
 (0)