Automatically Updating the Host App
Use the DTIS SDK to automatically update your Host App on a device. Device users must opt in for Auto Updates, and the Host App must capture and send the user's Auto Update preference to DT. By default, automatic app updates through Android OS require an idle device state. Auto Updates of the Host App through DT Ignite Services require the same idle device state:
Device is connected to an unmetered connection (
NETWORK_TYPE_UNMETERED).Device is charging.
Device is not actively in use.
When testing your Auto Update implementation, ensure that the test device meets these idle state conditions. For more information, see Testing Auto Updates.
The following diagram shows the general flow for implementing automatic updates of the Host App through the DTIS SDK:
1
Initialization and Connection The Host App initializes the DTIS SDK and connects to Ignite. This action establishes a secure connection between the two components and authenticates the Host App with Ignite. For more information, see Connect to Ignite.
2
Check for Auto Update Enabled
The Host App calls the getIsAutoUpdateEnabled() method to determine whether or not the device user has opted in for automatic updates of the Host App.
3
Capture User Preference If the user has not specified their Auto Update preference, the Host App must surface a UI to capture their preference.
4
Send Auto Update Preference
Send the device user's Auto Update preference to DT using the setIsAutoUpdateEnabled() method.
5
Listen for Auto Updates If a user has opted in for Auto Updates, Ignite schedules tasks to update the Host App on devices. Ignite broadcasts notifications when the updates are scheduled and completed. For more information, see Auto Update Broadcasts.
6
Disconnect from Ignite Disconnect from Ignite Services. For more information, see Disconnect from Ignite.
Testing Automatic Updates
When testing your Auto Update implementation, ensure that the test device state is in an idle state:
The device is connected to an unmetered connection (
NETWORK_TYPE_UNMETERED).The device is charging.
The device is not actively in use.
Use the following commands to set a device to the required idle state:
Last updated
