Digi WVA Android Library
version 2.0-SNAPSHOT

Package com.digi.wva.async

Callbacks on UI thread

See: Description

Package com.digi.wva.async Description

Callbacks on UI thread

To ease use of the WVA Android library, all asynchronous methods in the WVA class will by default execute their callbacks on the application UI thread (or main thread). Additionally, any "listeners" used to subscribe for data or alarms, or TCP stream connection status, will also have methods executed on the main thread by default.

See the documentation for the following methods for more information on this functionality, and how to force callbacks to execute in a background thread instead, if this is useful for your application:

These are some of the interactions which must be run from the main thread in Android:

The following tasks should not be done on the UI thread:

If the UI thread is blocked for more than a few seconds, the user may encounter an "application not responding" dialog. You should make sure to be careful in deciding which callbacks and listeners should be executed on the UI thread, and which can be handled on a background thread. (You always have the option of posting a Runnable to the main thread yourself.)

Digi WVA Android Library
version 2.0-SNAPSHOT