Data | SimpleHeath

SimpleHealth sample download
(Nov 3, 2020)

The SDK's Health Data provides a SimpleHealth sample application to read the today's step count.


Prerequisites to run SimpleHealth are:

  • Prepare an Android device that supports Android 6.0 Marshmallow (API level 23) or above.
    (Samsung and non-Samsung devices are available both.)

  • Add the SimpleHealth app's dev access code developer mode.

    • Client ID:
    • Access code: zc1ModEm
  • Import SimpleHealth with Android Studio (or Eclipse).

  • Run SimpleHealth on the device.


SimpleHealth demonstrates how to use Health Data's APIs for retrieving the today's step count with HealthConstants. StepCount data type and HealthDataObserver.

Especially, the health data store connection and exception handling would be helpful to your application to prepare unexpected error.

SimpleHealth's sources and resources are:

Source / Resource Description

Declaring required permissions with the <meta-data> element.


SimpleHealth's main activity.
  • Connecting to the health data store and handling exceptions through ConnectionListener.
  • Checking permission to read HealthConstants.StepCount and requesting permission if required.
  • Creating an option menu for setting permission.
  • Showing today's step count.

  • Reading today's total steps asynchronously.
  • Adding an observer to get notification for the step count's change.