ConnectivityManager.NetworkPreference 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.
Caution
deprecated
Retrieves the current preferred network type. -or- Specifies the preferred network type.
[System.Obsolete("deprecated")]
public virtual Android.Net.ConnectivityType NetworkPreference { [Android.Runtime.Register("getNetworkPreference", "()I", "GetGetNetworkPreferenceHandler")] [Android.Runtime.RequiresPermission("android.permission.ACCESS_NETWORK_STATE")] get; [Android.Runtime.Register("setNetworkPreference", "(I)V", "GetSetNetworkPreference_IHandler")] set; }
[<System.Obsolete("deprecated")>]
[<get: Android.Runtime.Register("getNetworkPreference", "()I", "GetGetNetworkPreferenceHandler")>]
[<get: Android.Runtime.RequiresPermission("android.permission.ACCESS_NETWORK_STATE")>]
[<set: Android.Runtime.Register("setNetworkPreference", "(I)V", "GetSetNetworkPreference_IHandler")>]
member this.NetworkPreference : Android.Net.ConnectivityType with get, set
Property Value
an integer representing the preferred network type
- Attributes
Remarks
Property getter documentation:
Retrieves the current preferred network type.
This member is deprecated. Functionality has been removed as it no longer makes sense, with many more than two networks - we'd need an array to express preference. Instead we use dynamic network properties of the networks to describe their precedence.
Java documentation for android.net.ConnectivityManager.getNetworkPreference()
.
Property setter documentation:
Specifies the preferred network type. When the device has more than one type available the preferred network type will be used.
This member is deprecated. Functionality has been removed as it no longer makes sense, with many more than two networks - we'd need an array to express preference. Instead we use dynamic network properties of the networks to describe their precedence.
Java documentation for android.net.ConnectivityManager.setNetworkPreference(int)
.
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.