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.WifiHotspot
WifiDirectHotSpot 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.String
TAG
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WifiDirectHotSpot
getInstance(android.content.Context appContext)
void
onChannelDisconnected()
void
onConnectionInfoAvailable(android.net.wifi.p2p.WifiP2pInfo info)
void
onGroupInfoAvailable(android.net.wifi.p2p.WifiP2pGroup group)
void
setNotifier(datahop.WifiHotspotNotifier notifier)
Set the notifier that receives the events advertised when creating or destroying the group or when receiving users connectionsvoid
start()
Starts the service and creates the Wifi-Direct groupvoid
stop()
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:
start
in interfacedatahop.WifiHotspot
-
stop
public void stop()
Stops the service and destroys the Wifi-Direct group- Specified by:
stop
in interfacedatahop.WifiHotspot
-
onChannelDisconnected
public void onChannelDisconnected()
- Specified by:
onChannelDisconnected
in interfaceandroid.net.wifi.p2p.WifiP2pManager.ChannelListener
-
onGroupInfoAvailable
public void onGroupInfoAvailable(android.net.wifi.p2p.WifiP2pGroup group)
- Specified by:
onGroupInfoAvailable
in interfaceandroid.net.wifi.p2p.WifiP2pManager.GroupInfoListener
-
onConnectionInfoAvailable
public void onConnectionInfoAvailable(android.net.wifi.p2p.WifiP2pInfo info)
- Specified by:
onConnectionInfoAvailable
in interfaceandroid.net.wifi.p2p.WifiP2pManager.ConnectionInfoListener
-
-