Implement the equivalents of the following AAT Android Workers:
TrackableRemovalRequested
ConnectionReady
The TrackableRemovalRequested worker is responsible for removing a trackable again once Ably connections have been made but the final steps (starting location updates etc in ConnectionReady) have not, and if since being added the trackable has been marked for removal. It posts TrackableRemovalSuccessWork, containing a success or failure result, depending on what it itself was passed.
Similar to DisconnectSuccess, it stops the ably connection if there are no other trackables. If an async error occurs, and we're in the process of disconnecting the ably connection, then StoppingConnectionFinished work is posted.
The ConnectionReadyWorker sets the publisher online, starts location updates and subscribes for channel state changes. If the trackable has been marked for removal, it calls ably.disconnect() and queues TrackableRemovalRequested with a success result.
If an async error occurs, TrackableRemovalRequested work is posted with a failure result.
On an synchronous error, FailTrackable work is posted.
Implement the equivalents of the following AAT Android Workers:
The TrackableRemovalRequested worker is responsible for removing a trackable again once Ably connections have been made but the final steps (starting location updates etc in ConnectionReady) have not, and if since being added the trackable has been marked for removal. It posts TrackableRemovalSuccessWork, containing a success or failure result, depending on what it itself was passed.
Similar to DisconnectSuccess, it stops the ably connection if there are no other trackables. If an async error occurs, and we're in the process of disconnecting the ably connection, then StoppingConnectionFinished work is posted.
The ConnectionReadyWorker sets the publisher online, starts location updates and subscribes for channel state changes. If the trackable has been marked for removal, it calls
ably.disconnect()
and queuesTrackableRemovalRequested
with a success result.If an async error occurs,
TrackableRemovalRequested
work is posted with a failure result.On an synchronous error,
FailTrackable
work is posted.This work depends on: