Reputation: 446
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.
Upvotes: 0
Views: 510
Reputation: 365
You will get WIFI_P2P_THIS_DEVICE_CHANGED_ACTION when you register for the WifiP2pBroadcastReceiver, it doesn't matter if wifi is already on.
Upvotes: 1