The task is the SDK's way to control and inform about its asynchronous operations
More...
All asynchronous SDK methods return a task object. The task object contains information on the progress, the result and can be used to cancel the task or wait for it to finish (block program execution). The progress and finished information of a task are received via callbacks. ( TaskListener.taskProgress() TaskListener.taskFinished() ) The classes or objects that initiate the task (see Geocoder or Navigation) provide appropriate callback setters.
If multiple tasks are triggered (e.g. multiple calls to Geocoder.listAddress()), the same callback function is triggered. The callback that initiated the callback is passed as parameter to the callback function and can be compared to the tasked that has been returned by the task initating function (e.g. Geocoder.listAddress() ) with the passed as parameter in the callback isIdentical method
- Attention
- This is only the base version of an asynchronous task. All SDK methods will return a Task<T> object that offers the possibility to retrieve a result object of the task. In case that no result object is generated by the Task it will by of type Task<Void>