Android APIs
public class

SubscriptionInfo

extends Object
implements Parcelable
java.lang.Object
   ↳ android.telephony.SubscriptionInfo

Class Overview

A Parcelable class for Subscription Information.

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<SubscriptionInfo> CREATOR
Public Methods
Bitmap createIconBitmap(Context context)
Creates and returns an icon Bitmap to represent this SubscriptionInfo in a user interface.
int describeContents()
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
CharSequence getCarrierName()
String getCountryIso()
int getDataRoaming()
CharSequence getDisplayName()
String getIccId()
int getIconTint()
A highlight color to use in displaying information about this PhoneAccount.
int getMcc()
int getMnc()
String getNumber()
int getSimSlotIndex()
int getSubscriptionId()
String toString()
Returns a string containing a concise, human-readable description of this object.
void writeToParcel(Parcel dest, int flags)
Flatten this object in to a Parcel.
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Fields

public static final Creator<SubscriptionInfo> CREATOR

Public Methods

public Bitmap createIconBitmap (Context context)

Creates and returns an icon Bitmap to represent this SubscriptionInfo in a user interface.

Parameters
context A Context to get the DisplayMetricss from.
Returns
  • A bitmap icon for this SubscriptionInfo.

public int describeContents ()

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

Returns
  • a bitmask indicating the set of special object types marshalled by the Parcelable.

public CharSequence getCarrierName ()

Returns
  • the name displayed to the user that identifies Subscription provider name

public String getCountryIso ()

Returns
  • the ISO country code

public int getDataRoaming ()

Returns

public CharSequence getDisplayName ()

Returns
  • the name displayed to the user that identifies this subscription

public String getIccId ()

Returns
  • the ICC ID.

public int getIconTint ()

A highlight color to use in displaying information about this PhoneAccount.

Returns
  • A hexadecimal color value.

public int getMcc ()

Returns
  • the MCC.

public int getMnc ()

Returns
  • the MNC.

public String getNumber ()

Returns
  • the number of this subscription.

public int getSimSlotIndex ()

Returns
  • the slot index of this Subscription's SIM card.

public int getSubscriptionId ()

Returns
  • the subscription ID.

public String toString ()

Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:

   getClass().getName() + '@' + Integer.toHexString(hashCode())

See Writing a useful toString method if you intend implementing your own toString method.

Returns
  • a printable representation of this object.

public void writeToParcel (Parcel dest, int flags)

Flatten this object in to a Parcel.

Parameters
dest The Parcel in which the object should be written.
flags Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE.