TelephonyManager.GetAllowedNetworkTypesForReason(Int32) Method

Definition

Get the allowed network types for certain reason.

[Android.Runtime.Register("getAllowedNetworkTypesForReason", "(I)J", "GetGetAllowedNetworkTypesForReason_IHandler", ApiSince=33)]
[Android.Runtime.RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE")]
public virtual long GetAllowedNetworkTypesForReason (int reason);
[<Android.Runtime.Register("getAllowedNetworkTypesForReason", "(I)J", "GetGetAllowedNetworkTypesForReason_IHandler", ApiSince=33)>]
[<Android.Runtime.RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE")>]
abstract member GetAllowedNetworkTypesForReason : int -> int64
override this.GetAllowedNetworkTypesForReason : int -> int64

Parameters

reason
Int32

the reason the allowed network type change is taking place

Returns

the allowed network type bitmask

Attributes

Remarks

Get the allowed network types for certain reason.

#getAllowedNetworkTypesForReason returns allowed network type for a specific reason.

Requires permission: android.Manifest.READ_PRIVILEGED_PHONE_STATE or that the calling app has carrier privileges (see #hasCarrierPrivileges).

Java documentation for android.telephony.TelephonyManager.getAllowedNetworkTypesForReason(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.

Applies to