Język

SubscriptionPlan.Types Property

Definition

Returns the characteristics of this subscription plan as a set of type constants.

public System.Collections.Generic.ICollection<Java.Lang.Integer> Types { [Android.Runtime.Register("getTypes", "()Ljava/util/Set;", "", ApiSince=37)] get; }
[<get: Android.Runtime.Register("getTypes", "()Ljava/util/Set;", "", ApiSince=37)>]
member this.Types : System.Collections.Generic.ICollection<Java.Lang.Integer>

Property Value

An unmodifiable Set of plan type constants, for example PLAN_TYPE_CELLULAR or PLAN_TYPE_DATA_ONLY. The set will be empty if no types are associated with the plan. This value cannot be null. Value is one of the following: PLAN_TYPE_CELLULAR; PLAN_TYPE_SATELLITE; PLAN_TYPE_IOT; PLAN_TYPE_POSTPAID; PLAN_TYPE_PREPAID; PLAN_TYPE_DATA_ONLY; PLAN_TYPE_FAMILY; PLAN_TYPE_BUSINESS; PLAN_TYPE_ROAMING; PLAN_TYPE_TETHERING

Attributes

Remarks

Returns the characteristics of this subscription plan as a set of type constants. A plan can have multiple types that describe its nature. For example, a plan might be both a PLAN_TYPE_CELLULAR and a PLAN_TYPE_POSTPAID plan.

The returned set allows for efficient checks of plan characteristics using Set.contains(Object) and Set.containsAll(java.util.Collection).

The types can be used to understand the plan's attributes and tailor an application's behavior. For instance, a data management app could display different UI elements for a PLAN_TYPE_PREPAID versus a PLAN_TYPE_POSTPAID plan.

Android reference for android.telephony.SubscriptionPlan.getTypes.

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