Resolved! FirebaseInstanceIdService is deprecated

So after updating the version of firebase-messaging in the build.gradle file from v17.0.0 to v17.1.0, strange things started happening…

there was a line of horror in service I used to use for messaging in my application. After some research, I landed on this page.

Let’s quickly go to updates which we need to do to get it working like before.

Now there is no need of FirebaseInstanceIdService to get token, so just delete it and also remove it from AndroidManifest.xml as well.

Method onTokenRefresh() is depriciated. Now we need to override onNewToken() method to get new token.


Method getToken() which we used in Activity is also depriciated now. Use getInstanceId() as follow


I hope this will help in time of crises 😛

Thanks for visiting :) Let me know if you have some suggestions or feedback for this post in the comment section. Looking for any tutorial or demo on FreakyJolly, just drop me a message here

Leave a Reply

Notify of