Create the MyFirebaseInstanceIDService Service
The MyFirebaseInstanceIDService Service enables various aspects of sending tokens to the Hurree server.
- It has the
onTokenRefresh()method which gives you a new FCM token.
- This token is then sent to the Hurree server.
To create the MyFirebaseInstanceIDService Service:
- Open your project in Android Studio and go File > New > Service > Service.
- Enter the Class Name and then Finish. The new class will open.
- In your project, open manifests > AndroidManifest.xml and ensure it looks like this: