Closed tobob closed 5 years ago
checked on both:
btw, iOS notification works always
@tobob It seems that you're using the action for GCM.
try to replace with <action android:name="com.google.firebase.MESSAGING_EVENT"/>
@fryossi I did change
<action android:name="com.google.android.c2dm.intent.RECEIVE"/>
into <action android:name="com.google.firebase.MESSAGING_EVENT"/>
but still Im don't get notification when app is off
Anyone succeeded to solve that problem?
i am facing the same issue ...
i am facing the same issue ...
same issue here
same issue
@akyker20 what are you using for push notification, fcm or firebase
@akyker20 I am using intercom in my project and able to get push notification. I am taking help from react-native-firebase. What I did was created a CustomFCMMessageService.java in same directory where mainApplication.java is present.
`package com.xxx.xxx;
import java.util.Map; import android.util.Log; import com.google.firebase.messaging.RemoteMessage; import com.webengage.sdk.android.WebEngage; import io.invertase.firebase.messaging.RNFirebaseMessagingService; import io.intercom.android.sdk.push.IntercomPushClient;
public class CustomFCMMessageService extends RNFirebaseMessagingService { private static final String TAG = "CustomFCMMessageService";
private final IntercomPushClient intercomPushClient = new IntercomPushClient();
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
Map message = remoteMessage.getData();
Log.d("MessageReceived", "" + message);
//Webengage
if (message != null) {
if (intercomPushClient.isIntercomPush(message)) {
Log.d(TAG, "Intercom message received");
intercomPushClient.handlePush(getApplication(), message);
} else {
super.onMessageReceived(remoteMessage);
Log.d(TAG, "NATIVE message received");
}
}
}
}
` I am using Firebase messaging service to detect push notification.
then in AndroidManifest.xml
add this ` <service android:name=".CustomFCMMessageService" // replacing firebase messaging service as suggested by doc android:enabled="true" android:exported="true">
</service>
`
Hope this will help :)
@tobob did you solve your issue somehow? I have the same problem like you.
@Rajat421 I created file CustomFCMMessageService
same like you and when I did this I started to receive notification on android.
But still can't get notification when app is killed instead when debug I get this error:
No Channel found for pkg=com.myapp, channelId=intercom_new_chats_channel
And this work in all cases but not when app is killed only on adnroid?
Im able to get push notification when app is on or in background, but then app is off with task manager I didn't get nothing
When I try to use only FCM dashboard Im getting it even if app is off
android/app/build.grandle
AndroidManifest.xml
permisions from AndroidManifest.xml