- Register on Firebase after the mobile number has been confirmed
- Listen to Firebase
getToken()and send the Instance ID to the Yona server
- When installing the Yona app the first time, it should be connected after confirming the mobile number. It can then be sent through a PUT on the device.
- When registering a new device, POST it in step 10 in Flow - Add another device.
- When Firebase refreshes the token (now and then), PUT it on the device again.
- The devices of the user are returned in the user profile, with the currently acting device marked with
requestingDevice = true. If the instance ID on that device differs from the ID retrieved through
getToken(), the app should PUT the current instance ID on the device.
- Implement receive of the message
- See documentation for Android and for iOS
- When the app is foregrounded,
- Refresh the messages
- When the app is backgrounded, Refresh the messages no need to do something, as the app does not cache messages
- When the app is backgrounded and launched by a tap of the notification,
- Act as if the specific message was tapped using the message URL included in the Push notification key-value set (if any)