Posts

Showing posts with the label firebase-cloud-messaging

firebase cloud messaging not received notification in some device

firebase cloud messaging not received notification in some device I used FCM to push notification, its work successfully in background and foreground mode, in the device that I used to debug while another device does not work in background mode. here is my code I wish ur help to know what the issue .is it from phone so how to fix it ? or from google services. here MyFirebaseInstanceIDService public class MyFirebaseInstanceIDService extends FirebaseInstanceIdService { SharedPrefManager sharedPrefManager; @Override public void onTokenRefresh() { // Get updated InstanceID token. String refreshedToken = FirebaseInstanceId.getInstance().getToken(); Log.wtf("myfirebase", "Refreshed token: " + refreshedToken); sendRegistrationToServer(refreshedToken); } public void sendRegistrationToServer(String refreshedToken ) { sharedPrefManager=new SharedPrefManager(getApplicationCon...

I am not getting FCM message probably FirebaseMessagingService is not running

I am not getting FCM message probably FirebaseMessagingService is not running I am using FCM for notification. Due to some issue, i am not getting notification when i am sending using FCM Cloud console. <service android:name=".MyInstanceIDService" android:exported="true"> <intent-filter> <action android:name="com.google.firebase.MESSAGING_EVENT" /> </intent-filter> </service> <service android:name=".MyMessagingService"> <intent-filter> <action android:name="com.google.firebase.INSTANCE_ID_EVENT" /> </intent-filter> </service> This is my both classes. public class MyInstanceIDService extends FirebaseInstanceIdService { private static final String TAG = "MyInstanceIDService"; @Override public void onTokenRefresh() { String refreshedToken = FirebaseInstanceId.getInstance...

FCM seldom Fails on Android device

FCM seldom Fails on Android device I've built an application to send instant message via FCM to Android devices by Json WebRequest. The application works fine but it seldom fail when the application posts to FCM server, and then may continuously fail for a while. FCM returns the same fail message below but I have no idea what's happening: {"multicast_id":6888830314994897268,"success":0,"failure":1,"canonical_ids":0,"results":[{"message_id":null}]} I found this documentation says that: For Android there is a limit of 100 messages that can be stored without collapsing. If the limit is reached, all stored messages are discarded. When the device is back online, it receives a special message indicating that the limit was reached. The app can then handle the situation properly, typically by requesting a full sync from the app server. But my Android devices do receive all of the messages the server sent when it is p...