GEMSUpdate notification

After BEMS processes a JSONStore API to create, update, or delete records, it sends a GEMSUpdate message to each BlackBerry Dynamics app registered for the URI item that did not send the original synchronization message. If multiple records are updated with the jsonstore API, only one GEMSUpdate message is sent. The BlackBerry Dynamics app then calls the JSONStore API to fetch the data using the "updated" time as the lastModifiedTime to synchronize the URI record (for example, bookmarks). The GEMSUpdate message includes the following properties:

Properties

Description

server

The server property identifies the BEMS instance that is sending the notification.

updated

The updated property specifies the server relative time that the update occurred. For example UTC ms since 1970/01/01.

from

The from property specifies the user's device which initiated the update. This value is based on the registrationID provided in the header of the JSONStore API to create, update, or delete a URI related item. For example, if the registrationId is "<user1>@USER1androidc123456789", the update is specified as originating from USER1androidc123456789.

item

The item property specifies the affected URI. In this example, the updated URI is bookmarks.

The following is a code example of the GEMSUpdate message received by the user's device:

{
   "GEMSUpdate" :
   {
      "server" : "<The computer hosting  BEMS>.<domain>:8181",
      "updated" : 98499696242,
      "from": "USER1androidc123456789",
      "item" : "bookmarks"
   }
}