Register a device
Last updated
Was this helpful?
Last updated
Was this helpful?
To register a new device you'll need to have a Firebase token, which you can obtain one from your FirebaseMessagingService
method onNewToken
:
Then is the best practice to register your device calling the registration API:
Where getDeviceID()
is your method to obtain the Android ID which will be your unique identifier. Pay attention to the changes Oreo makes to this data, refer to . Now your device is ready to receive push messages with your FirebaseMessagingService
method onMessageReceived
, but if you need to differentiate push groups you may need to use topics.