Samsung Health Data SDK Beta 2 connection issue

Hi! I am working on adding the newer Samsung Health Data SDK Beta 2 to my project and I am not able to reliably connect to Samsung Health because the library throws exceptions when trying to request permission or resolve the resolvable exceptions.

When Samsung Health is not installed, I get the exception 3000, which is correct and the resolution works by opening the Play Store install page.

Once I install the Samsung Health app and get back to my app, the code tries to continue with connecting, but then I get the exception 9004. I also see errors from the SDK log like this:

07:12:14.033  D  getGrantedPermissions invoked
07:12:14.050  E  Service binding failure
07:12:14.050  I  Service unbinding
07:12:14.050  E  Service unbinding failure
07:12:14.052  D  Samsung Health Exception: 9004 Remote exception occurs

In the situation where Health app is already installed, onboarded and dev mode enabled, the connection works perfectly.

The demo app bundled with the library also works great and handles exceptions well (the Service binding failure is not visible in the logs) when Samsung Health app needs to be installed.

Why does my app behave differently? Is it because dev mode is not enabled in the Samsung Health app while it hasn’t been onboarded yet? Is it because my app partnership is not yet confirmed?

Hello,
Please report this issue to the Developer Support for 1-on-1 communication.

Thanks
Shamima
Samsung Developer Program Team