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

limit the components that Intent will resolve to #687

Merged
merged 2 commits into from
Apr 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -360,11 +360,12 @@ public void sendToNotificationCentre(Bundle bundle) {

Intent actionIntent = new Intent(context, intentClass);
actionIntent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
actionIntent.setAction(context.getPackageName() + "." + action);
actionIntent.setAction(packageName + "." + action);

// Add "action" for later identifying which button gets pressed.
bundle.putString("action", action);
actionIntent.putExtra("notification", bundle);
actionIntent.setPackage(packageName);

PendingIntent pendingActionIntent = PendingIntent.getActivity(context, notificationID, actionIntent,
PendingIntent.FLAG_UPDATE_CURRENT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ protected void onHandleIntent(Intent intent) {
}

private void sendRegistrationToken(String token) {
Intent intent = new Intent(this.getPackageName() + ".RNPushNotificationRegisteredToken");
String packageName = this.getPackageName();
Intent intent = new Intent(packageName + ".RNPushNotificationRegisteredToken");
intent.putExtra("token", token);
intent.setPackage(packageName);
sendBroadcast(intent);
}
}