com.samsung.android.simplehealth E/SimpleHealth: Getting step count fails

590 views Asked by At

I'm trying to use Samsung sample SimpleHealth for retrieving data from Samsung Health app, but when I give the permission to get StepCount data, I get a weird error:

 java.lang.SecurityException: com.samsung.android.simplehealth does not match with registered signature. 4A:E1:B9:8D:04\
        at android.os.Parcel.createException(Parcel.java:2074)\
        at android.os.Parcel.readException(Parcel.java:2042)\
        at android.os.Parcel.readException(Parcel.java:1990)\
        at com.samsung.android.sdk.healthdata.IDataResolver$Stub$Proxy.readData2(IDataResolver.java:588)\
        at com.samsung.android.sdk.healthdata.HealthDataResolver.read(HealthDataResolver.java:576)\
        at com.samsung.android.simplehealth.StepCountReporter.readTodayStepCount(StepCountReporter.java:67)\
        at com.samsung.android.simplehealth.StepCountReporter.start(StepCountReporter.java:48)\
        at com.samsung.android.simplehealth.MainActivity$1.onConnected(MainActivity.java:72)\
        at com.samsung.android.sdk.healthdata.HealthDataStore$ErrorMessageHandler.handleMessage(HealthDataStore.java:593)\
        at android.os.Handler.dispatchMessage(Handler.java:107)\
        at android.os.Looper.loop(Looper.java:224)\
        at android.app.ActivityThread.main(ActivityThread.java:7548)\
        at java.lang.reflect.Method.invoke(Native Method)\
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)\
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
1

There are 1 answers

0
Vladimir Zotov On

Faced same error. You need to add dev access code. Follow Prerequisites section carefully from this page https://developer.samsung.com/health/android/sample/simple-health.html