Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The selected cloud service to implement this is Firebase, Google's mobile platform. It supports both Android and iOS.

Info

Note that for direct messages sent to the user we do not have the devices of the user available, as the devices are stored in the anonymized part of the user. Therefore notifications cannot be used to announce direct messages. An SMS may be used instead, as direct messages are sent only very few.


Use Firebase for Yona

Setting up Firebase for Yona is easy:

...

  • Support PUTting and POSTing the Instance ID as a device property 
    Jira
    serverJIRA
    columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
    serverId8869c742-95cd-3b13-9181-69ccc2e780a4
    keyYD-549
  • The devices of the user are returned in the user profile, with the currently acting device marked with requestingDevice = true. That device should also return the instance ID known at the server. 
    Jira
    serverJIRA
    columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
    serverId8869c742-95cd-3b13-9181-69ccc2e780a4
    keyYD-549
  • Send notifications to Firebase using the user device Instance ID when a message is sent to the user. The notifications will be sent to all devices of the user having a known Instance ID. 
    Jira
    serverJIRA
    columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
    serverId8869c742-95cd-3b13-9181-69ccc2e780a4
    keyYD-550
    • To be decided if this is required for the app implementation: Include the message URL in the notification key-value propertiesproperties 
      Jira
      serverJIRA
      columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
      serverId8869c742-95cd-3b13-9181-69ccc2e780a4
      keyYD-604

Requirements of Yona app

  • Register on Firebase after the mobile number has been confirmed
  • Listen to Firebase onTokenRefresh event, call 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 
    • 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)

...