When I discover peers to connect, I can get a list in this method:
@Override
public void onPeersAvailable(WifiP2pDeviceList peers) {
List<WifiP2pDevice> peersList = new ArrayList<WifiP2pDevice>(peers.getDeviceList());
}
WifiP2PDevice.deviceName returns the name specified in the system Wi-Fi settings on the WifiDirect page.
Let's say the user sets his nickname in my application to “John”, is it possible to change the name of the device so that when another device detects it, the name will be displayed as “John”?
source
share