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.