User Tools

Site Tools


connection_manager_for_ble

Connection Manager for BLE

Connection Manager for BLE is supported for auto connection. If AutoConnection is set for the remote device, it tries GATT connect when the remote device gets far away so that it will be connected automatically when the remote device gets close again. (Android client supported only for now)

When Connection Manager requests GATT connect to BT stack, ‘auto connect’ option is true, so BT stack connects automatically as soon as the remote device becomes available.

Feature

  • If GATT connection becomes disconnected by link loss or disconnect from the remote device, GATT connect will be requested for the remote device by Connection Manager.
  • If bluetooth adapter becomes enable, GATT connect will be requested for all remote devices set to auto connect by Connection Manager.
  • If the remote device becomes unpaired by user, Connection Manager removes the data about AutoConnection for the remote device.

Interaction flow

set AutoConnection(AC)

diconnected

adapter enable

API

/**
 *  Method start connection manager service.
 *  this method has to be called before other API call.
 *  @param context                                application context
 *  @param onConnectionManagerStateListener       connection state callback listener
 */
CaInterface.startManagerService(Context context,
                                OnConnectionManagerStateListener onConnectionManagerStateListener)
/**
 *  Method stop connection manager service.
 *  this method must be called, when Application is destroyed.
 */
CaInterface.stopManagerService()
/**
 *  Method set auto connection for the remote device.
 *  this method has to be called before service discovered for the remote device.
 */
CaInterface.setAutoConnectionDevice(String address)
/**
 *  Method unset auto connection for the remote device.
 */
CaInterface.unsetAutoConnectionDevice(String address)
connection_manager_for_ble.txt · Last modified: 2016/04/26 23:55 by Jaehong Jo