Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FireBaseInstanceId service does not get registered

I am trying to run demo given here. The problem is whenever app tries to register instanceId, it say "background sync failed: MISSING_INSTANCEID_SERVICE, retry in 320s" and then when I print token, it says token is null. I tried changing INSTANCE_ID_EVENTinstead of INSTANCEID_EVENT and other solution that were previously asked on stackoverflow, but none of them works for me.

like image 437
Mrugesh Thaker Avatar asked May 25 '16 04:05

Mrugesh Thaker


People also ask

What can I use instead of FirebaseInstanceId?

FirebaseInstanceId is deprecated but now you can use FirebaseMessaging. getInstance(). token.

How do I get FirebaseInstanceId?

The token can be generated using the following code: FirebaseMessaging. getInstance(). getToken() .

What is FirebaseInstanceId?

The Instance ID API lets you integrate Instance ID with your Android or iOS app. Instance ID provides a unique identifier for each instance of your app and a mechanism to authenticate and authorize actions, like sending messages via Firebase Cloud Messaging.

What is Firebasemessagingservice?

Firebase Cloud Messaging Platform (formerly named as GCM) is a free mobile notification service by Google that enables (third-party) app developers to send notifications from GCM (Google Cloud Messaging) servers to their users.


2 Answers

Firebase won't run without Google Play Services, so check if they are available.

like image 187
srivAbhishek001 Avatar answered Oct 13 '22 01:10

srivAbhishek001


When running on the emulator, use an image with the Google APIs.

like image 36
Levent Sağıroğlu Avatar answered Oct 13 '22 03:10

Levent Sağıroğlu