Watchdog

watchdog is a timer that must be reset periodically to indicate that the system is working properly. If it is not reset due to a hardware fault or program error, it will generate a reboot signal to restart the device and bring the system to a known operation mode.

The ConnectCore 6 provides a hardware watchdog interface used to restart the module when there is a system or application malfunction.

Digi extends the Android APIs with a System Watchdog Service that is not available in the common Android distributions and provides an API to manage the system watchdog. In addition to this, Digi includes a new software watchdog interface called Application Watchdog Service that is used to restart applications when malfunction is reported instead of restarting the entire system. The system watchdog is common to all applications running in the device, as it relies in the hardware layer, while the application watchdog is specific for each application.

In the Javadoc documentation you can find a complete list of the available methods in this API.

Unless noted, all Watchdog API methods (system or application watchdogs) require the com.digi.android.permission.WATCHDOG permission.

Note If your application does not have the com.digi.android.permission.WATCHDOG permission it will not have access to any Watchdog service feature.

The Watchdog Service includes:

Example: Watchdog

The Watchdog Sample Application demonstrates the usage of the Watchdog API. The sample allows you to interact with the watchdog service by registering the application either to the system or the application watchdog services and report application failure at any time.

You can import the example using Digi's Android Studio plugin. For more information, see Import a Digi sample application. To look at the application source code, go to the GitHub repository.