This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to auto reconnect to BLE in android when it is in range and starts advertising?

I am develop in Android BLE , I have no idea about Auto reconnect to BLE device in android when it is in range and starts advertising

I have reference the Android BLE Connect. The second parameter for autoConnect in mBluetoothGatt = device.connectGatt(this, true, mGattCallback); , and set it to true.

After I take away the BLE device's battery and power on again. The BLE device has advertising. But the Android App didn't auto reconnect to the BLE device.

I have to call startLeScan and connectGatt again by myself.

Does there has batter way to auto reconnect to BLE in android when it is in range and starts advertising ?

Parents Reply Children
No Data
Related