AndroidPub

The (retired) Pub(lication) for Android & Tech, focused on Development

Follow publication

Member-only story

New Way to Implement Firebase Push Notification — FirebaseInstanceIdService Deprecated (Android)

Danish
2 min readOct 25, 2018
Credits

As we already know that to Implement the push notifications with firebase we always need to define the two services.

com.google.firebase.INSTANCE_ID_EVENTcom.google.firebase.MESSAGING_EVENT

Now, In the new version of firebase-messaging, the firebaseInstanceIdService is Deprecated. In the new version we don’t need to use INSTANCE_ID_EVENT, just extend your MyInstanceIDListenerService service with FirebaseMessagingService like below:

Next Step is to @Override some methods:

@Override
public void onNewToken(String s) {
super.onNewToken(s);
}
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
}

Visit my website at https://danishamjad.com/

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

AndroidPub
AndroidPub

Published in AndroidPub

The (retired) Pub(lication) for Android & Tech, focused on Development

Responses (4)

Write a response