DHIS2 Android SDK 1.0.0 is officially released

Dear DHIS2 community,

We are pleased to inform you that the DHIS2 Android Software Development Kit (SDK) 1.0.0 is officially released! The SDK is a core DHIS2 common good for Android developers to facilitate the development of Android apps using DHIS2 as a platform. The SDK allows Android developers to more easily build custom apps leveraging the many functionalities included in the SDK.

SDK community2

The SDK 1.0.0 is compatible with the versions 2.30, 2.31, 2.32 and 2.33 of DHIS2. Therefore, Android developers can build their own apps fully compatible with those DHIS2 versions.

The main functionalities are:

Offline data collection: The SDK contains a local database representing the DHIS2 data model for mobile Apps. This means that it contains the definitions of all DHIS2 resources such as programs, data sets, data elements, tracked entities, organisation units, etc. It ensures that all the metadata required to perform data entry tasks is available at any time to build the data entry forms.

Sync services with the server: The SDK connects directly to a DHIS2 instance to synchronize the metadata/data from the server, storing them in the local database, and sending new or updated data from the database to the server. The sync process is configurable and it allows syncing by:

  • Tracked Entity Instance / Event: sync one TEI or event
  • Programs: sync all TEIs/events for a particular program
  • Device: sync the data in the device below a max number of TEIs or events configured by the user

Data Access Layer: The SDK provides a common layer to easily access the database and/or the objects returned by the API.

  • Database: Retrieve all information (metadata and data) from the local storage using Java objects instead of SQL sentences and save new data (TEIs, events and aggregate data) collected in the device.
  • API: Retrieve information (TEIs, events, and datavalues) from the API using Java objects instead of calling APIs directly.

In some cases, like TrackedEntityInstace search, this layer can combine the results coming from both sources (database and API), resulting in a unified list of tracked entity instances.

Error / conflict management: Manages the connection between the Android app and the DHIS2 instance, giving feedback on any errors due to a lack of internet connectivity or any conflicts/errors during the communication with the server through the DHIS2 API.

Storage unique values: The SDK reserves values for attributes that are unique and automatically generated, making it possible to collect data for programs with unique attributes when the app is also offline. The number of unique values to store is configurable in the SDK.

Data Quality: Removes possible inconsistencies coming from the DHIS2 API (eg. data values for data elements that no longer belong to a given program) before storing them in the database.

Program indicator engine: The SDK includes its own Program Indicator engine for the evaluation of in-line Program Indicators. These kinds of indicators are evaluated within the context of an enrollment.

The functionality of the SDK including code examples is fully documented. You can also download and check out the SDK code in the following GitHub repository.

In order to facilitate the adoption and use of the Android SDK, we have also developed a skeleton Android app that ingrates the SDK. This app consists of a scaffold to build other Android applications using the SDK, containing just the login and the initial sync of metadata and data. This skeleton is intended to be used by Android developers as a foundation for further building out their own apps. It also contains several use cases for advanced functionality (eg. listing programs and datasets, navigating TEIs, etc.)

As you may know, the upcoming Android app 2.0.0 is using SDK version 1.0.0. We really hope to hear from the community about your SDK use cases and look forward to growing an ecosystem of fit-for-purpose DHIS2 Android apps with the community’s innovative contributions. Please keep us posted!

UiO Android Team


This is great news! Thanks@jose and team.


Well done. Great news.


1 Like

The good news we have been waiting for…ages now…

1 Like

Well done team, this is really great!


1 Like

Wow this is grate kudos to the jone team.
Tomps up to you

1 Like