The SubscribeToPresenceWorker does nothing if the trackable is being or has been removed. It asynchronously waits for the ably channel to become attached, and then performs a presence subscribe operation. If waiting for the ably channel to attach results in failure, then FailTrackable work should be posted - this is different to Android, but we have opened an issue over there to bring the android equivalent worker to parity with the EnterPresenceWorker.
If presence.subscribe fails, then at then SubscribeToPresence work is posted for a retry.
On presence.subscribe succeeding, SubscribeToPresenceSuccess work should be posted.
SubscribeToPresenceSuccess work marks the trackable as having subscribed to presence and asks the publisher to update trackable states. It does nothing if the trackable has been removed.
Implement the following AAT Android workers:
The
SubscribeToPresenceWorker
does nothing if the trackable is being or has been removed. It asynchronously waits for the ably channel to become attached, and then performs a presence subscribe operation. If waiting for the ably channel to attach results in failure, thenFailTrackable
work should be posted - this is different to Android, but we have opened an issue over there to bring the android equivalent worker to parity with theEnterPresenceWorker
.If presence.subscribe fails, then at then SubscribeToPresence work is posted for a retry.
On presence.subscribe succeeding, SubscribeToPresenceSuccess work should be posted.
SubscribeToPresenceSuccess work marks the trackable as having subscribed to presence and asks the publisher to update trackable states. It does nothing if the trackable has been removed.
This work is dependent on: