WifiP2pDevice.IpAddress Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Get the IP address of the connected client device.
public virtual Java.Net.InetAddress? IpAddress { [Android.Runtime.Register("getIpAddress", "()Ljava/net/InetAddress;", "GetGetIpAddressHandler", ApiSince=35)] get; }
[<get: Android.Runtime.Register("getIpAddress", "()Ljava/net/InetAddress;", "GetGetIpAddressHandler", ApiSince=35)>]
member this.IpAddress : Java.Net.InetAddress
Property Value
the IP address if the device is a part of the group; otherwise null.
- Attributes
Remarks
Get the IP address of the connected client device. The application should listen to WifiP2pManager#WIFI_P2P_CONNECTION_CHANGED_ACTION
broadcast to obtain the IP address of the connected client. When system assigns the IP address, the connected P2P device information (WifiP2pGroup#getClientList()
) in the group is updated with the IP address and broadcast the group information using WifiP2pManager#EXTRA_WIFI_P2P_GROUP
extra of the WifiP2pManager#WIFI_P2P_CONNECTION_CHANGED_ACTION
broadcast intent.
Alternatively, the application can request for the group details with WifiP2pManager#requestGroupInfo
and use (WifiP2pGroup#getClientList()
) to obtain the connected client details.
Java documentation for android.net.wifi.p2p.WifiP2pDevice.getIpAddress()
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.