0

Is there a way to get my current Wifi-Direct device name without listening to WIFI_P2P_THIS_DEVICE_CHANGED_ACTION ? If wifi is already enabled I guess I cannot receive that intent.

I'm developing an app to create a WiFi direct group and share devices locations between peers. When I open a group I need to initialize a data structure, a map in the form of ( deviceName, lastLocation) with my location. A group is created by the user when pressing a button.

diningphil
  • 416
  • 5
  • 18

1 Answers1

1

You will get WIFI_P2P_THIS_DEVICE_CHANGED_ACTION when you register for the WifiP2pBroadcastReceiver, it doesn't matter if wifi is already on.

Quote

Community
  • 1
  • 1
László Magyar
  • 355
  • 1
  • 16