java.lang.Object | |
↳ | cyanogenmod.app.CMTelephonyManager |
The CMTelephonyManager allows you to view and manage the phone state and the data connection, with multiple SIMs support.
To get the instance of this class, utilize CMTelephonyManager#getInstance(Context context)
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | ASK_FOR_SUBSCRIPTION_ID | Subscription ID used to set the default Phone and SMS to "ask every time". |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Get or create an instance of the
CMTelephonyManager
| |||||||||||
Gets the list of
SubscriptionInfo that are registered on the
phone.
| |||||||||||
Checks if the network data connection is enabled.
| |||||||||||
Checks if the received subscription received has the data
connection enabled.
| |||||||||||
Returns the state of the SIM by subscription ID.
| |||||||||||
Sets the network data conection active or inactive.
| |||||||||||
Sets the default phone used to make phone calls as the one received on subId.
| |||||||||||
Sets the default phone used to send SMS as the one received on subId.
| |||||||||||
Sets the state of one of the SIMs by subscription ID.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Subscription ID used to set the default Phone and SMS to "ask every time".
Get or create an instance of the CMTelephonyManager
Gets the list of SubscriptionInfo
that are registered on the
phone.
Checks if the network data connection is enabled.
This method will return true
(or false
if inactive)
even when an internet connection is active through Wifi/BT.
true
if the network data connection is enabled, false
otherwise.
Checks if the received subscription received has the data
connection enabled.
This method will return true
(or false
if inactive on the SIM)
even when an internet connection is active through Wifi/BT.
If the subscription ID is not valid the method will return false.
subId | The subscription ID to query. |
---|
true
if the data connection is enabled on the SIM, false
otherwise.
Returns the state of the SIM by subscription ID.
If the subscription ID is not valid the method will return false
.
subId | The subscription ID to query. |
---|
true
if the SIM is activated (even without signal or requesting the
PIN/PUK), false
otherwise.
Sets the network data conection active or inactive.
state | If true enables the network data connection, if false disables it.
|
---|
Sets the default phone used to make phone calls as the one received on subId. If ASK_FOR_SUBSCRIPTION_ID is used as a parameter, then the option to choose what SIM to use is selected.
subId | The subscription to set as default for phone calls. To select SIM when calling use ASK_FOR_SUBSCRIPTION_ID. |
---|
Sets the default phone used to send SMS as the one received on subId. If ASK_FOR_SUBSCRIPTION_ID is used as a parameter, then the option to choose what SIM to use is selected.
subId | The subscription to set as default for sending SMS. To select SIM when sending SMS use ASK_FOR_SUBSCRIPTION_ID. |
---|
Sets the state of one of the SIMs by subscription ID. If the subscription ID is not valid or the SIM already is in the desired state the method will do nothing.
subId | The subscription ID to change the state. |
---|---|
state | true to activate the SIM, false to disable.
|