close
The Wayback Machine - https://web.archive.org/web/20160419044619/https://developer.android.com/reference/android/telephony/SubscriptionInfo.html
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
BERJAYAFrom 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
BERJAYA From class java.lang.Object
BERJAYA 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 Context: A Context to get the DisplayMetricss from.
Returns
Bitmap 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
int a bitmask indicating the set of special object types marshalled by the Parcelable.

public CharSequence getCarrierName ()

Added in API level 22

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

public String getCountryIso ()

Added in API level 22

Returns
String the ISO country code

public int getDataRoaming ()

Added in API level 22

Returns
int the data roaming state for this subscription, either DATA_ROAMING_ENABLE or DATA_ROAMING_DISABLE.

public CharSequence getDisplayName ()

Added in API level 22

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

public String getIccId ()

Added in API level 22

Returns
String the ICC ID.

public int getIconTint ()

Added in API level 22

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

Returns
int A hexadecimal color value.

public int getMcc ()

Added in API level 22

Returns
int the MCC.

public int getMnc ()

Added in API level 22

Returns
int the MNC.

public String getNumber ()

Added in API level 22

Returns
String the number of this subscription.

public int getSimSlotIndex ()

Added in API level 22

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

public int getSubscriptionId ()

Added in API level 22

Returns
int 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
String 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 Parcel: The Parcel in which the object should be written.
flags int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE.