public static interface WifiConnectHelper.ConnectListener
Modifier and Type | Method and Description |
---|---|
void |
completedConnectP2p(android.net.wifi.p2p.WifiP2pInfo info)
wifi p2p connected then this function will be called.
|
void |
disconnectP2p(boolean forceClose,
int p2pState,
android.net.wifi.p2p.WifiP2pInfo info,
java.lang.String targetWifiP2pName)
wifi p2p disconnected then this function will be called.
|
void |
discoveryP2pTryCnt(int p2pState,
int tryCnt)
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 completedConnectP2p(android.net.wifi.p2p.WifiP2pInfo info)
info
- wifi p2p informationvoid discoveryP2pTryCnt(int p2pState, int tryCnt)
p2pState
- this parameter has WifiP2pManager.WIFI_P2P_STATE_DISABLED, WifiP2pManager.WIFI_P2P_STATE_ENABLED value.tryCnt
- actually this is start and stop count.void disconnectP2p(boolean forceClose, int p2pState, android.net.wifi.p2p.WifiP2pInfo info, java.lang.String targetWifiP2pName)
forceClose
- if disconnected by connection changed or retry discovery p2p, this parameter has false and reconnect again. but forceClose is true then
cannot start reconnect.p2pState
- this parameter has WifiP2pManager.WIFI_P2P_STATE_DISABLED, WifiP2pManager.WIFI_P2P_STATE_ENABLED value.info
- wifi p2p informationtargetWifiP2pName
- discovery target wifi p2p ssid