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.aarintoandroid/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
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.