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

Added in API level 22

Public Methods

public Bitmap createIconBitmap (Context context)

Added in API level 22

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 ()

Added in API level 22

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 ()

Added in API level 22

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

public String getCountryIso ()

Added in API level 22

Returns
  • the ISO country code

public int getDataRoaming ()

Added in API level 22

Returns

public CharSequence getDisplayName ()

Added in API level 22

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

public String getIccId ()

Added in API level 22

Returns
  • the ICC ID.

public int getIconTint ()

Added in API level 22

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

Returns
  • A hexadecimal color value.

public int getMcc ()

Added in API level 22

Returns
  • the MCC.

public int getMnc ()

Added in API level 22

Returns
  • the MNC.

public String getNumber ()

Added in API level 22

Returns
  • the number of this subscription.

public int getSimSlotIndex ()

Added in API level 22

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

public int getSubscriptionId ()

Added in API level 22

Returns
  • the subscription ID.

public String toString ()

Added in API level 22

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)

Added in API level 22

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.