b8ne / react-native-pusher-push-notifications

Manage pusher interest subscriptions and notification events in Javascript.
MIT License
97 stars 85 forks source link

com.pusher.android.notifications.fcm.FCMInstanceIDService is not registered in your AndroidManifest.xml #49

Closed dorklord23 closed 4 years ago

dorklord23 commented 4 years ago

This is similar to issue #8 .

I use:

I am not sure this might help but I tried to use Pusher's Device API to add a device but failed with this response:

{
    "initialInterestSet": null,
    "tokenValidationResponse": {
        "description": "MismatchSenderId",
        "details": "Sender is not allowed to publish notifications to this client. Make sure your app's google-services.json is linked to this client token.",
        "sent_device_token": "SECRET_KEY",
        "success": false,
        "platform": "fcm"
    }
}

Been pulling my hair out since this morning. Any help would be appreciated. Thanks.

PS: I check the log with adb logcat -s PUSHER_WRAPPER:V and got this error:

Exception in PusherWrapper com.pusher.android.notifications.fcm.FCMInstanceIDService is not registered in your AndroidManifest.xml

I have added <service android:name="com.pusher.android.notifications.fcm.FcmInstanceIdService" /> inside <application> in AndroidManifest.xml to no avail, though.

dorklord23 commented 4 years ago

The doc needs to be updated. It is said to install from NPM but the actual, working version is the one from the repo. After switched to the repo, it worked wonder.