Language

SubscriptionPlan.Builder.SetDataLimit(Int64, DataLimitBehavior) Method

Definition

Set the usage threshold at which data access changes.

[Android.Runtime.Register("setDataLimit", "(JI)Landroid/telephony/SubscriptionPlan$Builder;", "GetSetDataLimit_JIHandler", ApiSince=28)]
public virtual Android.Telephony.SubscriptionPlan.Builder? SetDataLimit(long dataLimitBytes, Android.Telephony.DataLimitBehavior dataLimitBehavior);
[<Android.Runtime.Register("setDataLimit", "(JI)Landroid/telephony/SubscriptionPlan$Builder;", "GetSetDataLimit_JIHandler", ApiSince=28)>]
abstract member SetDataLimit : int64 * Android.Telephony.DataLimitBehavior -> Android.Telephony.SubscriptionPlan.Builder
override this.SetDataLimit : int64 * Android.Telephony.DataLimitBehavior -> Android.Telephony.SubscriptionPlan.Builder

Parameters

dataLimitBytes
Int64

The usage threshold in bytes. Android 9 through Android 16 reject negative values. Starting with Android 17, the framework also accepts BytesUnknown.

dataLimitBehavior
DataLimitBehavior

The behavior of data access when usage reaches the threshold. Value is one of the following: Unknown Disabled Billed Throttled. Android 9 through Android 16 reject Unknown.

Returns

This builder with the data limit and limit behavior set.

Attributes

Remarks

Set the usage threshold at which data access changes.

Android reference for android.telephony.SubscriptionPlan.Builder.setDataLimit.

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