This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Android BluetoothSocket is blocking

The Android API Kitkat documentation says the following about BluetoothSockect.connect()

"This method will block until a connection is made or the connection fails. If this method returns without an exception then this socket is now connected."

My app is calling nrf51822 and I receive the event BLE_GAP_EVT_CONNECTED

What else needs to happen in the event handler in order for BluetoothSockect.connect() to unblock and execute the rest of the code?

By the way I'm creating an insecure connection as follows: BluetoothSocket BleDeviceSocket = device.createInsecureRfcommSocketToServiceRecord(MY_UUID_INSECURE);

Are there any examples for this? Thanks,

Parents Reply Children
No Data
Related