Skip to main content

Ready to market your stellar app?

Samsung Developer Program is your gateway to app monetization success.

Learn More

Samsung Developer Program

Updating Previous Rich Notifications

 

Your Android™ app can generate an updated rich notification to a previous rich notification (to the original and to any number of previous updates to the original). The updated rich notification can then be sent to the remote device via notify() by specifying the UUID of the original rich notification. Upon update a callback is initiated, which the Android app can receive via an event listener.

If the original rich notification and any number of updated rich notifications have been posted but not yet sent, all will be sent after a remote wearable device connects to the Android device. Upon receipt by the remote device, the user can open the original and all updated rich notifications. However, after opening the original and any of the updated rich notifications PRIOR to the latest update, the user cannot re-open them. The latest update rich notification is retained and can be re-opened by the user, until it is deleted (either manually or because it exceeds the 50 rich notification limit per RN Android app).

For details about RN callback event listeners, see Managing Rich Notification Callbacks.

SrnRichNotification
getUuid() Returns the Universally Unique IDentifier (UUID) of the rich notification.

SrnRichNotification
(Context, UUID)

Creates an update rich notification from the specified context, for the specified previous rich notification.

context

uuid

Context from which the update rich notification is to be created.

Universally Unique IDentifier of the previous rich notification.

SrnRichNotificationManager

notify()

Posts the new or updated rich notification in order for the RN Service to send it to the connected Gear device. 

notification Declared name of the rich notification to be posted.

Returns:

UUID assigned to the rich notification.

 

To get the UUID of a previously posted rich notification:

notificationId = getUuid(myPreviousRichNotification)

 

To post an update rich notification to a previously posted rich notification:

SrnRichNotification myUpdatedRichNotification = new
                               SrnRichNotification(Context, prevRichNotifacationUuid);
richNotificationManager.notify(myUpdatedRichNotification);

 

 

 

 

  • Was this article helpful?