Importing the SDK library and build setup

Import the samsung-health-data-api.aar library into your app project’s libs folder and add it into the module level build.gradle of your app project. Include also Gson dependency.

dependencies {
    implementation(fileTree(mapOf("dir" to "libs", 
        "include" to "health-data-api-1.0.0.aar")))
    implementation "com.google.code.gson:gson:2.9.0"
}

Apply kotlin-parcelize plugin to your module level build.gradle file.

plugins {
    id("kotlin-parcelize")
}