You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, even having an int/long ID, the Android app uses tst as a unique key. Meanwhile, iOS added the property rid. This difference causes issues when sending updates (via setWaypoints cmd) between both OS, Android can detect just fine duplicates (as they have the same tst), but the iOS is having a hard time detecting the duplicated object and may add an extra record to the list of regions/waypoints.
When a message without rid arrives to the iOS app, the app creates a rid from the hash of tst+name, but this means the name can not be changed at all. Also, new waypoints are created by the iOS app using random IDs, but this information is lost on the Android app, so updates submitted by the Android for a waypoint created by iOS might not have the same rid (because as the rid is missing, iOS will generate one from the hash, which might not match the random one).
My suggested implementation is to keep the tst as the "main" unique key in the Android app, but adds the rid property as a secondary unique key (maybe a hash from the tst). This way the app can save the rid generated by the iOS app (and send it back for updates) but also Waypoints as a whole will have an ID that is common and stable between OS's.
Fully agree with this concept. iOS using the name as key always breaks when the users decide they want to rename a waypoint.
As a workaround from the hub side, I send a clearWaypoints command before setWaypoints command. This removes all the waypoints on the mobile, and replaces then with "correct" ones.
Only catch is you need to send all waypoints vs update a single one.
Currently, even having an int/long ID, the Android app uses
tst
as a unique key. Meanwhile, iOS added the propertyrid
. This difference causes issues when sending updates (viasetWaypoints
cmd) between both OS, Android can detect just fine duplicates (as they have the sametst
), but the iOS is having a hard time detecting the duplicated object and may add an extra record to the list of regions/waypoints.When a message without
rid
arrives to the iOS app, the app creates arid
from the hash oftst+name
, but this means the name can not be changed at all. Also, new waypoints are created by the iOS app using random IDs, but this information is lost on the Android app, so updates submitted by the Android for a waypoint created by iOS might not have the samerid
(because as therid
is missing, iOS will generate one from the hash, which might not match the random one).My suggested implementation is to keep the
tst
as the "main" unique key in the Android app, but adds therid
property as a secondary unique key (maybe a hash from thetst
). This way the app can save therid
generated by the iOS app (and send it back for updates) but also Waypoints as a whole will have an ID that is common and stable between OS's.The text was updated successfully, but these errors were encountered: