Package network.datahop.wifidirect
Class WifiDirectHotSpot
- java.lang.Object
-
- network.datahop.wifidirect.WifiDirectHotSpot
-
- All Implemented Interfaces:
android.net.wifi.p2p.WifiP2pManager.ChannelListener,android.net.wifi.p2p.WifiP2pManager.ConnectionInfoListener,android.net.wifi.p2p.WifiP2pManager.GroupInfoListener,datahop.WifiHotspot
public class WifiDirectHotSpot extends java.lang.Object implements android.net.wifi.p2p.WifiP2pManager.ConnectionInfoListener, android.net.wifi.p2p.WifiP2pManager.ChannelListener, android.net.wifi.p2p.WifiP2pManager.GroupInfoListener, datahop.WifiHotspotWifiDirectHotSpot class creates a Wifi-Direct group in autonomous mode; i.e. a Wifi-Direct group is generated without requiring any user connected to it, and can be discovered and joined in the same way a legacy WiFi hotspot. Implements WifiHotspot (link to go bindings)
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringTAG
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WifiDirectHotSpotgetInstance(android.content.Context appContext)voidonChannelDisconnected()voidonConnectionInfoAvailable(android.net.wifi.p2p.WifiP2pInfo info)voidonGroupInfoAvailable(android.net.wifi.p2p.WifiP2pGroup group)voidsetNotifier(datahop.WifiHotspotNotifier notifier)Set the notifier that receives the events advertised when creating or destroying the group or when receiving users connectionsvoidstart()Starts the service and creates the Wifi-Direct groupvoidstop()Stops the service and destroys the Wifi-Direct group
-
-
-
Field Detail
-
TAG
public static final java.lang.String TAG
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static WifiDirectHotSpot getInstance(android.content.Context appContext)
-
setNotifier
public void setNotifier(datahop.WifiHotspotNotifier notifier)
Set the notifier that receives the events advertised when creating or destroying the group or when receiving users connections- Parameters:
notifier- instance
-
start
public void start()
Starts the service and creates the Wifi-Direct group- Specified by:
startin interfacedatahop.WifiHotspot
-
stop
public void stop()
Stops the service and destroys the Wifi-Direct group- Specified by:
stopin interfacedatahop.WifiHotspot
-
onChannelDisconnected
public void onChannelDisconnected()
- Specified by:
onChannelDisconnectedin interfaceandroid.net.wifi.p2p.WifiP2pManager.ChannelListener
-
onGroupInfoAvailable
public void onGroupInfoAvailable(android.net.wifi.p2p.WifiP2pGroup group)
- Specified by:
onGroupInfoAvailablein interfaceandroid.net.wifi.p2p.WifiP2pManager.GroupInfoListener
-
onConnectionInfoAvailable
public void onConnectionInfoAvailable(android.net.wifi.p2p.WifiP2pInfo info)
- Specified by:
onConnectionInfoAvailablein interfaceandroid.net.wifi.p2p.WifiP2pManager.ConnectionInfoListener
-
-