# Subscription management

**Detailed Description**

This section contains APIs related to Subscription Management.

- *group* Telematics\_subscription

    - - class ISubscription

    - Subscription returns information about network operator subscription details pertaining to a SIM card.

Public Functions

- virtual std::string getCarrierName() = 0

    - Retrieves the name of the carrier on which this subscription is made.

On platforms with Access control enabled, Caller needs to have TELUX\_TEL\_SUB\_PRIVATE\_INFO permission to invoke this API successfully.

- Returns:

    - Name of the carrier.

- virtual std::string getIccId() = 0

    - Retrieves the SIM’s ICCID (Integrated Chip ID) - i.e SIM Serial Number.

On platforms with Access control enabled, Caller needs to have TELUX\_TEL\_PRIVATE\_INFO\_READ permission to invoke this API successfully.

- Returns:

    - Integrated Chip Id.

- virtual int getMcc() = 0

    - Retrieves the mobile country code of the carrier to which the phone is connected.

On platforms with Access control enabled, Caller needs to have TELUX\_TEL\_SUBSCRIPTION\_READ permission to invoke this API successfully.

Deprecated Use [telux::tel::ISubscription::getMobileCountryCode()](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#a00768_1a63edccf80107dd30063534adfd85dbd3) API instead

- Returns:

    - Mobile Country Code.

- virtual int getMnc() = 0

    - Retrieves the mobile network code of the carrier to which phone is connected.

On platforms with Access control enabled, Caller needs to have TELUX\_TEL\_SUBSCRIPTION\_READ permission to invoke this API successfully.

Deprecated Use [telux::tel::ISubscription::getMobileNetworkCode()](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#a00768_1ace60bf9e0fc6e1da17e2892a6a9e1e53) API instead

- Returns:

    - Mobile Network Code.

- virtual std::string getMobileCountryCode() = 0

    - Retrieves the mobile country code(MCC) of the carrier to which the phone is connected.

On platforms with Access control enabled, Caller needs to have TELUX\_TEL\_SUBSCRIPTION\_READ permission to invoke this API successfully.

- Returns:

    - mcc.

- virtual std::string getMobileNetworkCode() = 0

    - Retrieves the mobile network code(MNC) of the carrier to which the phone is connected.

On platforms with Access control enabled, Caller needs to have TELUX\_TEL\_SUBSCRIPTION\_READ permission to invoke this API successfully.

- Returns:

    - mnc.

- virtual std::string getPhoneNumber() = 0

    - Retrieves the phone number for the SIM subscription.

On platforms with Access control enabled, Caller needs to have TELUX\_TEL\_SUB\_PRIVATE\_INFO permission to invoke this API successfully.

- Returns:

    - PhoneNumber.

- virtual int getSlotId() = 0

    - Retrieves SIM Slot index for the SIM pertaining to this subscription object.

On platforms with Access control enabled, Caller needs to have TELUX\_TEL\_SUBSCRIPTION\_READ permission to invoke this API successfully.

- Returns:

    - SIM slotId.

- virtual std::string getImsi() = 0

    - Retrieves IMSI (International Mobile Subscriber Identity) for the SIM. This will have home network MCC and MNC values.

On platforms with Access control enabled, Caller needs to have TELUX\_TEL\_SUB\_PRIVATE\_INFO permission to invoke this API successfully.

- Returns:

    - imsi.

- virtual std::string getGID1() = 0

    - Retrieves the GID1(group identifier level1) on the SIM. It represents identifier for particular SIM and ME associations. It can be used to identify a group of SIMs for a particular application. Defined in 3GPP Spec 131.102 section 4.2.10

On platforms with Access control enabled, Caller needs to have TELUX\_TEL\_SUBSCRIPTION\_READ permission to invoke this API successfully.

- Returns:

    - GID1 content in hex format.

- virtual std::string getGID2() = 0

    - Retrieves the GID2(group identifier level2) content on the SIM. It represents identifier for particular SIM and ME associations. It can be used to identify a group of SIMs for a particular application. Defined in 3GPP Spec 131.102 section 4.2.11

On platforms with Access control enabled, Caller needs to have TELUX\_TEL\_SUBSCRIPTION\_READ permission to invoke this API successfully.

- Returns:

    - GID2 content in hex format.

- inline virtual ~ISubscription()

    -

- class ISubscriptionListener : public [telux](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv4N5telux6commonE)::[IServiceStatusListener](https://docs.qualcomm.com/doc/80-PF458-10/topic/class_a00049.html#_CPPv4N5telux6common22IServiceStatusListenerE)

    - A listener class for receiving device subscription information. The methods in listener can be invoked from multiple different threads. The implementation should be thread safe.

Public Functions

- inline virtual void onSubscriptionInfoChanged(std::shared\_ptr&lt;[ISubscription](https://docs.qualcomm.com/doc/80-PF458-10/topic/class_a00768.html#_CPPv4N5telux3tel13ISubscriptionE)&gt; subscription)

    - This function is called whenever there is a change in Subscription details.

- Parameters:

    - **subscription** – **[in]** Pointer to [ISubscription](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#a00768) Object.

- inline virtual void onNumberOfSubscriptionsChanged(int count)

    - This function called whenever there is a change in the subscription count. for example when a new subscription is discovered or an existing subscription goes away when SIM is inserted or removed respectively.

- Parameters:

    - **count** – **[in]** count of subscription

- inline virtual ~ISubscriptionListener()

    -

- class ISubscriptionManager

    - Public Functions

- virtual bool isSubsystemReady() = 0

    - Checks the status of SubscriptionManager and returns the result.

- Returns:

    - If true then SubscriptionManager is ready for service. Deprecated Use [ISubscriptionManager::getServiceStatus()](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#a00770_1a0895bc508f01d2c057ad665a1f9a6046) API.

- virtual std::future&lt;bool&gt; onSubsystemReady() = 0

    - Wait for Subscription subsystem to be ready.

- Returns:

    - A future that caller can wait on to be notified when SubscriptionManager is ready. Deprecated Use InitResponseCb in [PhoneFactory::getSubscriptionManager](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#a00742_1a6baa0675fd6e86eb4930d3688b4723c5) instead, to get notified about subsystem readiness.

- virtual [telux](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv4N5telux6commonE)::[ServiceStatus](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv4N5telux6common13ServiceStatusE) getServiceStatus() = 0

    - This status indicates whether the [ISubscriptionManager](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#a00770) object is in a usable state.

- Returns:

    - SERVICE\_AVAILABLE - If Subscription manager is ready for service. SERVICE\_UNAVAILABLE - If Subscription manager is temporarily unavailable. SERVICE\_FAILED - If Subscription manager encountered an irrecoverable failure.

- virtual std::shared\_ptr&lt;[ISubscription](https://docs.qualcomm.com/doc/80-PF458-10/topic/class_a00768.html#_CPPv4N5telux3tel13ISubscriptionE)&gt; getSubscription(int slotId = [DEFAULT\_SLOT\_ID](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv4N6SlotId15DEFAULT_SLOT_IDE), [telux](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv4N5telux6commonE)::[Status](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv4N5telux6common6StatusE) \*status = nullptr) = 0

    - Get Subscription details of the SIM in the given SIM slot.

- Parameters:

    - - **slotId** – **[in]** Slot id corresponding to the subscription.
- **status** – **[out]** Status of getSubscription i.e. success or suitable status code.

- Returns:

    - Pointer to [ISubscription](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#a00768) object.

- virtual std::vector&lt;std::shared\_ptr&lt;[ISubscription](https://docs.qualcomm.com/doc/80-PF458-10/topic/class_a00768.html#_CPPv4N5telux3tel13ISubscriptionE)&gt;&gt; getAllSubscriptions([telux](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv4N5telux6commonE)::[Status](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv4N5telux6common6StatusE) \*status = nullptr) = 0

    - Get all the subscription details of the device.

- Parameters:

    - **status** – **[out]** Status of getAllSubscriptions i.e. success or suitable status code.

- Returns:

    - list of [ISubscription](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#a00768) objects.

- virtual [telux](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv4N5telux6commonE)::[Status](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv4N5telux6common6StatusE) registerListener(std::weak\_ptr&lt;[ISubscriptionListener](https://docs.qualcomm.com/doc/80-PF458-10/topic/class_a00769.html#_CPPv4N5telux3tel21ISubscriptionListenerE)&gt; listener) = 0

    - Register a listener for Subscription events.

- Parameters:

    - **listener** – **[in]** Pointer to [ISubscriptionListener](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#a00769) object that processes the notification.

- Returns:

    - Status of registerListener i.e. success or suitable status code.

- virtual [telux](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv4N5telux6commonE)::[Status](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv4N5telux6common6StatusE) removeListener(std::weak\_ptr&lt;[ISubscriptionListener](https://docs.qualcomm.com/doc/80-PF458-10/topic/class_a00769.html#_CPPv4N5telux3tel21ISubscriptionListenerE)&gt; listener) = 0

    - Remove a previously added listener.

- Parameters:

    - **listener** – **[in]** Pointer to [ISubscriptionListener](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#a00769) object that needs to be removed.

- Returns:

    - Status of removeListener i.e. success or suitable status code.

- inline virtual ~ISubscriptionManager()

    -

Last Published: Mar 31, 2026

[Previous Topic
telux::tel::IMultiSimListener](https://docs.qualcomm.com/bundle/publicresource/80-PF458-10/topics/multi_sim.md) [Next Topic
Network selection](https://docs.qualcomm.com/bundle/publicresource/80-PF458-10/topics/network_selection.md)