HBandSDK / Android_Ble_SDK

Android SDK
Apache License 2.0
42 stars 37 forks source link

Manage multiple devices #14

Open hernan93 opened 9 months ago

hernan93 commented 9 months ago

We have problems managing two or more devices in the same application for the same brand/sdk, both on Android and on IOS, which makes us wonder if the SDK supports this case because on IOS, for example, there is no function that disconnects a wearable through its Mac Address, otherwise it closes all connections, and in Android there is a function to close the connection through the Mac Address “disconnectBT” and there is another function to disconnect “disconnectWatch” that does not receive parameters, the latter always gives us Disconnect the last connected wearable and not the one we have selected Regarding this we ask, does the SDK support several peripheral connections in the same time?

HacBach commented 5 months ago

How do you get the watch's data information? ![Uploading B7B5B7BB-6D2B-4B3C-9DE7-53A96B5B9D40.jpg…]()

Sartharian commented 5 months ago

Sorry for late comm.. The docs explicity says "try to not perform too many operations between paired devices", this may end receiving bad/corrupt data, and it happens.

Sartharian commented 5 months ago

We have problems managing two or more devices in the same application for the same brand/sdk, both on Android and on IOS, which makes us wonder if the SDK supports this case because on IOS, for example, there is no function that disconnects a wearable through its Mac Address, otherwise it closes all connections, and in Android there is a function to close the connection through the Mac Address “disconnectBT” and there is another function to disconnect “disconnectWatch” that does not receive parameters, the latter always gives us Disconnect the last connected wearable and not the one we have selected Regarding this we ask, does the SDK support several peripheral connections in the same time?

the bluetooth hardware interface disconnects all devices in a unused or no interaction time period. you can try keeping the mac stored and perform a "keep connected" technique (using Service in android maybe)

Sartharian commented 5 months ago

@HacBach what did you mean?. could you post again that image to see it please?

HacBach commented 5 months ago

@Sartharian 1 I want to get the value of the parameters displayed on the clock, what function should I use? Can you give me an example? 2 How to reconnect the device after losing connection without searching and connecting again? I thank you