Partager via


SubscriptionManager.SetSubscriptionOverrideUnmetered Method

Definition

Overloads

SetSubscriptionOverrideUnmetered(Int32, Boolean, Int64)

Temporarily override the billing relationship plan between a carrier and a specific subscriber to be considered unmetered.

SetSubscriptionOverrideUnmetered(Int32, Boolean, Int32[], Int64)

Temporarily override the billing relationship plan between a carrier and a specific subscriber to be considered unmetered.

SetSubscriptionOverrideUnmetered(Int32, Boolean, Int64)

Temporarily override the billing relationship plan between a carrier and a specific subscriber to be considered unmetered.

[Android.Runtime.Register("setSubscriptionOverrideUnmetered", "(IZJ)V", "GetSetSubscriptionOverrideUnmetered_IZJHandler", ApiSince=28)]
public virtual void SetSubscriptionOverrideUnmetered (int subId, bool overrideUnmetered, long expirationDurationMillis);
[<Android.Runtime.Register("setSubscriptionOverrideUnmetered", "(IZJ)V", "GetSetSubscriptionOverrideUnmetered_IZJHandler", ApiSince=28)>]
abstract member SetSubscriptionOverrideUnmetered : int * bool * int64 -> unit
override this.SetSubscriptionOverrideUnmetered : int * bool * int64 -> unit

Parameters

subId
Int32

the subscriber this override applies to.

overrideUnmetered
Boolean

set if the billing relationship should be considered unmetered.

expirationDurationMillis
Int64

the duration after which the requested override will be automatically cleared, or 0 to leave in the requested state until explicitly cleared, or the next reboot, whichever happens first.

Attributes

Remarks

Temporarily override the billing relationship plan between a carrier and a specific subscriber to be considered unmetered. This will be reflected to apps via NetworkCapabilities#NET_CAPABILITY_NOT_METERED.

This method is only accessible to the following narrow set of apps: <ul> <li>The carrier app for this subscriberId, as determined by TelephonyManager#hasCarrierPrivileges(). <li>The carrier app explicitly delegated access through CarrierConfigManager#KEY_CONFIG_PLANS_PACKAGE_OVERRIDE_STRING. </ul>

Java documentation for android.telephony.SubscriptionManager.setSubscriptionOverrideUnmetered(int, boolean, long).

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

SetSubscriptionOverrideUnmetered(Int32, Boolean, Int32[], Int64)

Temporarily override the billing relationship plan between a carrier and a specific subscriber to be considered unmetered.

[Android.Runtime.Register("setSubscriptionOverrideUnmetered", "(IZ[IJ)V", "GetSetSubscriptionOverrideUnmetered_IZarrayIJHandler", ApiSince=31)]
public virtual void SetSubscriptionOverrideUnmetered (int subId, bool overrideUnmetered, int[] networkTypes, long expirationDurationMillis);
[<Android.Runtime.Register("setSubscriptionOverrideUnmetered", "(IZ[IJ)V", "GetSetSubscriptionOverrideUnmetered_IZarrayIJHandler", ApiSince=31)>]
abstract member SetSubscriptionOverrideUnmetered : int * bool * int[] * int64 -> unit
override this.SetSubscriptionOverrideUnmetered : int * bool * int[] * int64 -> unit

Parameters

subId
Int32

the subscriber this override applies to.

overrideUnmetered
Boolean

set if the billing relationship should be considered unmetered.

networkTypes
Int32[]

the network types this override applies to. If no network types are specified, override values will be ignored.

expirationDurationMillis
Int64

the duration after which the requested override will be automatically cleared, or 0 to leave in the requested state until explicitly cleared, or the next reboot, whichever happens first.

Attributes

Remarks

Temporarily override the billing relationship plan between a carrier and a specific subscriber to be considered unmetered. This will be reflected to apps via NetworkCapabilities#NET_CAPABILITY_NOT_METERED.

This method is only accessible to the following narrow set of apps: <ul> <li>The carrier app for this subscriberId, as determined by TelephonyManager#hasCarrierPrivileges(). <li>The carrier app explicitly delegated access through CarrierConfigManager#KEY_CONFIG_PLANS_PACKAGE_OVERRIDE_STRING. </ul>

Java documentation for android.telephony.SubscriptionManager.setSubscriptionOverrideUnmetered(int, boolean, int[], long).

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