Added in API level 28

SubscriptionPlan


class SubscriptionPlan : Parcelable
kotlin.Any
   ↳ android.telephony.SubscriptionPlan

Description of a billing relationship plan between a carrier and a specific subscriber. This information is used to present more useful UI to users, such as explaining how much mobile data they have remaining, and what will happen when they run out.

If specifying network types, the developer must supply at least one plan that applies to all network types (default), and all additional plans may not include a particular network type more than once. This is enforced by SubscriptionManager when setting the plans.

Plan selection will prefer plans that have specific network types defined over plans that apply to all network types.

Summary

Nested classes

Builder for a SubscriptionPlan.

Constants
static Long

Value indicating data rate is unknown.

static Long

Value indicating a number of bytes is unknown.

static Long

Value indicating a number of bytes is unlimited.

static Int

Indicates that the user will be billed for data usage beyond the limit.

static Int

Indicates that data access is disabled when the data limit is reached.

static Int

Indicates that data access is throttled to a slower speed when the limit is reached.

static Int

Indicates that the behavior for when a data limit is reached is unknown.

static Int

The plan is for business or enterprise customers.

static Int

The plan provides conventional cellular service.

static Int

The plan is for data-only service.

static Int

The plan is a family plan, shared among multiple users.

static Int

The plan is designed for Internet of Things (IoT) devices.

static Int

The plan is a postpaid plan.

static Int

The plan is a prepaid plan.

static Int

The plan is specifically for roaming services.

static Int

The plan provides satellite-based service.

static Int

The plan provides a data allowance specifically for tethering or mobile hotspot usage.

static Int

The subscription is active.

static Int

The subscription is inactive.

static Int

The subscription is suspended.

static Int

The subscription is in a trial period.

static Int

The subscription status is unknown.

static Long

Value indicating a timestamp is unknown.

static Int

Value indicating that the SubscriptionPlan ID is not specified.

Inherited constants
Public methods
MutableIterator<Range<ZonedDateTime!>!>!

Returns an iterator that provides the data usage billing cycles for this plan, based on its recurrence rule.

Int

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

Boolean
equals(other: Any?)

Indicates whether some other object is "equal to" this one.

Int

Returns the behavior of data access when usage reaches the limit defined by getDataLimitBytes().

Long

Returns the data limit for the plan.

Long

Returns a snapshot of the mobile data usage, in bytes, as of the time reported by getDataUsageTime().

ZonedDateTime?

Returns the time at which the data usage will reset.

Long

Returns the time at which getDataUsageBytes() was measured, in milliseconds since the Unix epoch.

Int

Returns the unique integer identifier for this subscription plan.

IntArray

Returns the network types that this plan applies to.

ZonedDateTime?

Returns the end date of this subscription plan.

Int

Returns the status of the subscription plan.

CharSequence?

Returns a brief, human-readable summary of the subscription plan.

CharSequence?

Returns a user-visible title for this plan.

MutableSet<Int!>

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

Int

Returns a hash code value for the object.

String

Returns a string representation of the object.

Unit
writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<SubscriptionPlan!>

Constants

BITRATE_UNKNOWN

Added in API level 37
static val BITRATE_UNKNOWN: Long

Value indicating data rate is unknown.

Value: -1L

BYTES_UNKNOWN

Added in API level 28
static val BYTES_UNKNOWN: Long

Value indicating a number of bytes is unknown.

This value is used when the carrier has not provided a specific data limit or usage value.

Value: -1L

BYTES_UNLIMITED

Added in API level 28
static val BYTES_UNLIMITED: Long

Value indicating a number of bytes is unlimited.

This value is used when the carrier has not specified a data limit.

Value: 9223372036854775807L

LIMIT_BEHAVIOR_BILLED

Added in API level 28
static val LIMIT_BEHAVIOR_BILLED: Int

Indicates that the user will be billed for data usage beyond the limit.

When the user exceeds their data limit, they will incur overage charges. Data access continues, but at an additional cost.

Value: 1

LIMIT_BEHAVIOR_DISABLED

Added in API level 28
static val LIMIT_BEHAVIOR_DISABLED: Int

Indicates that data access is disabled when the data limit is reached.

Once the user's data usage hits the defined limit, their mobile data connection will be turned off until the next billing cycle begins.

Value: 0

LIMIT_BEHAVIOR_THROTTLED

Added in API level 28
static val LIMIT_BEHAVIOR_THROTTLED: Int

Indicates that data access is throttled to a slower speed when the limit is reached.

After the user consumes their high-speed data allowance, the data connection remains active but is reduced to a lower bandwidth for the remainder of the billing cycle.

Value: 2

LIMIT_BEHAVIOR_UNKNOWN

Added in API level 28
static val LIMIT_BEHAVIOR_UNKNOWN: Int

Indicates that the behavior for when a data limit is reached is unknown.

This is the default value and should be used when the carrier has not specified what happens when the user's data usage exceeds the limit.

Value: -1

PLAN_TYPE_BUSINESS

Added in API level 37
static val PLAN_TYPE_BUSINESS: Int

The plan is for business or enterprise customers.

This type indicates that the plan may include features tailored for corporate use, such as dedicated support, static IP addresses, or specific service-level agreements (SLAs).

Value: 8

PLAN_TYPE_CELLULAR

Added in API level 37
static val PLAN_TYPE_CELLULAR: Int

The plan provides conventional cellular service.

This type is for standard mobile plans that offer data, voice, and messaging services over terrestrial cellular networks (e.g., 4G LTE, 5G).

Value: 1

PLAN_TYPE_DATA_ONLY

Added in API level 37
static val PLAN_TYPE_DATA_ONLY: Int

The plan is for data-only service.

This type indicates that the plan provides only mobile data connectivity and does not include traditional voice or SMS services. It is commonly used for tablets, mobile hotspots, or as a secondary data line.

Value: 6

PLAN_TYPE_FAMILY

Added in API level 37
static val PLAN_TYPE_FAMILY: Int

The plan is a family plan, shared among multiple users.

This type indicates that data limits and usage may be pooled across several subscriptions. Data management applications can use this to provide a consolidated view of the shared usage for all members of the family plan.

Value: 7

PLAN_TYPE_IOT

Added in API level 37
static val PLAN_TYPE_IOT: Int

The plan is designed for Internet of Things (