Samsung Health Data SDK – Missing classes in AAR when integrating into

I’m trying to integrate the Samsung Health Data SDK into a Flutter Android app, and I’m running into missing class issues even though I’m importing the .aar file exactly like the sample app.

What I did

  • Added samsung-health-data-api-1.0.0.aar into android/app/libs/

  • Added this in build.gradle:

repositories { flatDir { dirs "libs" } }
implementation(fileTree(dir: "libs", include: ["*.aar"]))
  • Imported classes like:

    import com.samsung.android.sdk.health.data.HealthDataStore
    import com.samsung.android.sdk.health.data.request.DataType
    import com.samsung.android.sdk.health.data.request.filter.LocalTimeFilter
    
    
  • These are used in the official sample app.

The problem

The .aar I downloaded only includes aidl interfaces for request and filter, but none of the actual Kotlin/Java class implementations exist. Example:

jar tf samsung-health-data-api-1.0.0.aar | grep 'request' 
# Shows only .aidl files, no .class files

So my app fails to compile with errors like:

Unresolved reference: DataType
Unresolved reference: LocalTimeFilter
Interface Builder<T> does not have constructors

Question

:backhand_index_pointing_right: Where can I download the full Samsung Health Data SDK AAR that includes the actual implementation classes for:

  • com.samsung.android.sdk.health.data.request.DataType

  • com.samsung.android.sdk.health.data.request.filter.*

  • AggregateRequest.Builder, etc.

Or am I missing additional dependencies that need to be included along with samsung-health-data-api-1.0.0.aar?

Any guidance or correct download link would be greatly appreciated!

Thanks in advance.

Hello,

Please report this issue to the Developer Support for 1-on-1 communication.
It will solve your problem faster.

Thanks
Shamima
Samsung Developer Program Team

1 Like

I was able to get the sample app to build after cleaning the gradle and rebuilding.

1 Like