HBandSDK / Android_Ble_SDK

Android SDK
Apache License 2.0
42 stars 37 forks source link

I have a question about using sdk. (E400 Model) #16

Open LseungHn opened 7 months ago

LseungHn commented 7 months ago
  1. In the case of the E400 (BT5.1) model, how can automatic connectivity be implemented? When the app was running, we explicitly tried to connect through the connectDevice function and performed user authentication through the ConfirmDevice function.

Android attempts to automatically reconnect when you enable the autoConnect option in BluetoothCallback.

I tried it in the following way in SDK.

val bluetoothGatt = VPOperateManager.getInstance().getConnectGatt(VPOperateManager.getCurrentDeviceAddress()) bluetoothGatt.device.connectGatt( VPOperateManager.mContext, autoConnect, bleConnectListener ) Enabling gatt's autoConnect option via the function will automatically reconnect, but all functions in the SDK will become unavailable. Please suggest how we can reconnect.

  1. No HRV related data is imported from onOriginHRVOriginListDataChange. However, the system log of the onOriginFiveMinuteListDataChange function outputs the Hrv value. How can I receive the HRV value?

Mobile phones used for testing: Galaxy Note 8 Android version: 9 BuildGradle version : 7.4.0 Kotlin version : 1.7.0

sdk version : last version (Commits on Mar 26, 2024)

HacBach commented 5 months ago

How do you get the watch's data information?

Sartharian commented 4 months ago

sorry for that, i'm not tested that bluetoothGatt method, but you could try to keep the watch conectivity by using Service in android. my recommendation is learn or think just a little bit about how bluetooth radio devices works first =). cheers