I have a NodeJs server and 谋'm sending notification with that.When app is on background everything is OK but if app is foregoroun when i trigger the notification my app is crash.
Did you try with the example app from this repo ?
@berkeguncan what version of firebaseVersion are you using?
I had this and removed the GCM stuff in the android manifest and that fixed the problem. Otherwise monitor logcat when it crashes and get some more info.
I have the same problem... When GCM is "active"
<receiver
android:name="com.google.android.gms.gcm.GcmReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE"/>
<category android:name="${applicationId}"/>
</intent-filter>
</receiver>
app crash on notification, either remote and local... If you remove this code from AndroidManifest.xml, local notifications work, but without surprise, remotes do not. Has someone an idea to solve this ?
UPDATE : there is already a topic about this issue (#796)
@rjp44 found a way to solve this (at least it worked for me as I don't use Firebase
OK, so I can solve the problem (for me), by backing out the change introduced in #717 (commit 44cb230 ) to RNPushNotificationListnerService which starts deriving it from FireBaseListenerService.
I'm trying to use GCM in an existing project though, not Firebase so this probably won't help you as I guess it will further break attempts to use the Firebase API.
At the very least it seems like #717 breaks GCM, and may not work with Firebase either. I'm certainly not an expert on Google APIs but from 5 mins reading the code it seems to use the GCM calls to Register the ID, then use the FireBase Listener on it. Maybe that is an OK thing to do, but if I revert it at least GCM starts working again.
I have the same problem... When GCM is "active"
<receiver android:name="com.google.android.gms.gcm.GcmReceiver" android:exported="true" android:permission="com.google.android.c2dm.permission.SEND" > <intent-filter> <action android:name="com.google.android.c2dm.intent.RECEIVE"/> <category android:name="${applicationId}"/> </intent-filter> </receiver>app crash on notification, either remote and local... If you remove this code from AndroidManifest.xml, local notifications work, but without surprise, remotes do not. Has someone an idea to solve this ?
UPDATE : there is already a topic about this issue (#796)
@rjp44 found a way to solve this (at least it worked for me as I don't use Firebase
OK, so I can solve the problem (for me), by backing out the change introduced in #717 (commit 44cb230 ) to RNPushNotificationListnerService which starts deriving it from FireBaseListenerService.
I'm trying to use GCM in an existing project though, not Firebase so this probably won't help you as I guess it will further break attempts to use the Firebase API.
At the very least it seems like #717 breaks GCM, and may not work with Firebase either. I'm certainly not an expert on Google APIs but from 5 mins reading the code it seems to use the GCM calls to Register the ID, then use the FireBase Listener on it. Maybe that is an OK thing to do, but if I revert it at least GCM starts working again.
Solved my problem Thanks @johanschram
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.
Most helpful comment
I have the same problem... When GCM is "active"
app crash on notification, either remote and local... If you remove this code from AndroidManifest.xml, local notifications work, but without surprise, remotes do not. Has someone an idea to solve this ?
UPDATE : there is already a topic about this issue (#796)
@rjp44 found a way to solve this (at least it worked for me as I don't use Firebase