Why does firebase push_token return Blacklisted?

2019-03-11 03:29发布

问题:

I am implementing Firebase messaging in my app.

While I am testing the app sends the refreshed_token to my database, but in live production environment (Play store) it returns 'BLACKLISTED' as push_token.

Does someone know why this happen? Or what I can do to fix this problem. Can't find others with the same problem.

I use the code from the Firebase documentation.

@Override
public void onTokenRefresh() {
    super.onTokenRefresh();
    String refreshedToken = FirebaseInstanceId.getInstance().getToken();
    Log.d(TAG, "Refreshed token: " + refreshedToken);
    sendTokenToServer(refreshedToken);
}

The sendTokenToServer method posts the token to my api and inserts in the database.

回答1:

from Firebase support:

Hi there,

It seems that this is a known minor issue with our internal infrastructure where the device used for the Play Store review can be BLACKLISTED by GCM / FCM in some occasions. However, this should not affect your real users. We are looking beyond Firebase and working with Play Store team to avoid this inconvenience.



回答2:

I can conclude after researching this problem that when an emulator runs the app Firebase will return BLACKLISTED. Also thanks to @kR105



回答3:

The App will be running on an emulator hence Firebase token will be Blacklisted