TelephonyManager.DataEnabled Property

Definition

Returns whether mobile data is enabled or not per user setting. -or- Values used to return status for hasCarrierPrivileges call.

public virtual bool DataEnabled { [Android.Runtime.Register("isDataEnabled", "()Z", "GetIsDataEnabledHandler", ApiSince=26)] get; [Android.Runtime.Register("setDataEnabled", "(Z)V", "GetSetDataEnabled_ZHandler", ApiSince=26)] [Android.Runtime.RequiresPermission("android.permission.MODIFY_PHONE_STATE")] set; }
[<get: Android.Runtime.Register("isDataEnabled", "()Z", "GetIsDataEnabledHandler", ApiSince=26)>]
[<set: Android.Runtime.Register("setDataEnabled", "(Z)V", "GetSetDataEnabled_ZHandler", ApiSince=26)>]
[<set: Android.Runtime.RequiresPermission("android.permission.MODIFY_PHONE_STATE")>]
member this.DataEnabled : bool with get, set

Property Value

Boolean

true if mobile data is enabled.

Attributes

Remarks

Property getter documentation:

Java documentation for android.telephony.TelephonyManager.isDataEnabled().

Property setter documentation:

Java documentation for android.telephony.TelephonyManager.setDataEnabled(boolean).

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