public static interface ConnectManager.Listener
Modifier and Type | Method and Description |
---|---|
void |
alert(ConnectManager.ALERT alert)
you can check below alert by realtime.
|
void |
bluetoothDiscovery(int cnt,
int max)
when bluetooth discovery started, this function will be call.
|
void |
bluetoothState(ConnectManager.STATE state,
ConnectManager.PARING paring) |
void |
p2pDiscovery(int cnt,
boolean locationEnabled)
this is not normal function because wifi p2p discovery no need to call several times. but sometimes cannot find neckbands's wifi p2p ssid
because neckband's wifi p2p can not recognize to disconnected opponent device sometimes.
|
void |
p2pState(ConnectManager.STATE state,
ConnectManager.STATUS status,
android.net.wifi.p2p.WifiP2pInfo info) |
void |
restartAfterLocationEnabled()
wifi p2p cannot discovery without location service. so this function will be call when location enabled.
|
void |
step(ConnectManager.STEP step)
you can check all connection current step
|
void bluetoothState(ConnectManager.STATE state, ConnectManager.PARING paring)
state
- you can check current bluetooth state. ( STATE_CONNECTING, STATE_CONNECTED, STATE_DISCONNECTED, STATE_RECONNECTING )paring
- you can check current pairing state. ( REQUEST, CANCELED, BONDED, BONDED_NONE )void bluetoothDiscovery(int cnt, int max)
cnt
- current discovery countmax
- max discovery countvoid p2pState(ConnectManager.STATE state, ConnectManager.STATUS status, android.net.wifi.p2p.WifiP2pInfo info)
state
- you can check current wifi p2p state. ( STATE_CONNECTING, STATE_CONNECTED, STATE_DISCONNECTED, STATE_RECONNECTING )status
- this parameter has get P2P_ENABLED, P2P_DISABLED, P2P_FIND_BT
P2P_FIND_BT - if wifi p2p disconnected, find device's bluetoothinfo
- current wifi p2p informationvoid p2pDiscovery(int cnt, boolean locationEnabled)
cnt
- actually start and stop cntlocationEnabled
- wifi p2p cannot work without location service. so if locationEnabled is false, you have to alert message to user.void step(ConnectManager.STEP step)
step
- this parameter has STEP_START, STEP_BT, STEP_BT_FINDING, STEP_P2P, STEP_DONE, STEP_NONE value.void alert(ConnectManager.ALERT alert)
alert
- this parameter has ALERT_DISABLE, ALERT_GPS_ENABLED, ALERT_GPS_DISABLED, ALERT_BT_OFF, ALERT_P2P_OFF value.
if alert has ALERT_DISABLE, it means that connected or disconnected already so close all alert message.void restartAfterLocationEnabled()