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

Additional FirebaseMessagingService #1356

Open
@ewindso

Description

@ewindso

I need to have a primary FirebaseMessagingService in my Android app, but at the same time pass it along to react-native-push-notification. I'm following the instructions here: https://medium.com/@chornenkyy.v/do-you-want-to-use-two-or-more-firebasemessagingservices-at-once-67236d1bd9e0

However, when I attempt to call rnPushService.onMessageReceived(remoteMessage), I get:

java.lang.NullPointerException: Attempt to invoke interface method 'com.facebook.react.ReactNativeHost com.facebook.react.ReactApplication.getReactNativeHost()' on a null object reference
  at com.dieam.reactnativepushnotification.modules.RNPushNotificationListenerService$1.run(RNPushNotificationListenerService.java:82)
  at android.os.Handler.handleCallback(Handler.java:789)
  at android.os.Handler.dispatchMessage(Handler.java:98)

Any tips on getting past this would be great!

Note, that if I use RNPushNotificationListenerService as my primary one, it does work properly.

Thanks,

Elijah

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions