Skip to content

Commit

Permalink
fix(messaging, android): handle nullable broadcast intent (#7893) (#7960
Browse files Browse the repository at this point in the history
)

Co-authored-by: Russell Wheatley <russellwheatley85@gmail.com>
  • Loading branch information
divineniiquaye and russellwheatley authored Aug 19, 2024
1 parent f978d86 commit c1ac022
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ public void onReceive(Context context, Intent intent) {
if (ReactNativeFirebaseApp.getApplicationContext() == null) {
ReactNativeFirebaseApp.setApplicationContext(context.getApplicationContext());
}
if (intent.getExtras() == null) {
Log.e(TAG, "broadcast intent received with no extras");
return;
}
RemoteMessage remoteMessage = new RemoteMessage(intent.getExtras());
ReactNativeFirebaseEventEmitter emitter = ReactNativeFirebaseEventEmitter.getSharedInstance();

Expand Down

0 comments on commit c1ac022

Please sign in to comment.