openhab-android icon indicating copy to clipboard operation
openhab-android copied to clipboard

Changes to cloud notification registration

Open digitaldan opened this issue 6 months ago • 3 comments

Hi, we are implementing supporting multiple openHABs in the iOS client right now. Part of this change will require the addition of a extra payload value to the FCM notification message, registrationId (or something similar). This ID would also be returned when calling the cloud registration endpoint, right now it just returns the text Updated.

We plan on using this id to track which openHAB the notification was sent from. My question here is:

  1. Will this break anything right now in the Android app (new payload key and returning the ID instead of Updated)
  2. Is this something the Android app would possibly use as well?

Thanks!

digitaldan avatar Jun 09 '25 18:06 digitaldan

@mueller-ma bump ;-)

digitaldan avatar Jun 11 '25 22:06 digitaldan

  1. When the new key is optional it shouldn't break the app.
  2. Right now notifications are only supported for the main server in the app. Support for other servers might be added.

mueller-ma avatar Jun 13 '25 14:06 mueller-ma

Thanks, i'll probably add this soon, maybe today, i'll let you know in case it's helpful down the road at some point (and i'll close this issue as well).

digitaldan avatar Jun 15 '25 15:06 digitaldan

This change is live, the FCM registration response now returns {"userId":"..."}, this is also included in the payload of notifications.

digitaldan avatar Jun 22 '25 18:06 digitaldan