public class

HtcTelephonyManager

extends Object
java.lang.Object
   ↳ com.htc.service.HtcTelephonyManager

Summary

Constants
String ACTION_PHONE_STATE_CHANGED_EXT
int ICC_STATE_ABSENT ICC card state: no uim card is available in the device
int ICC_STATE_NETWORK_LOCKED ICC card state: Locked: requries a network PIN to unlock
int ICC_STATE_PIN_REQUIRED ICC card state: Locked: requires the user's UIM PIN to unlock
int ICC_STATE_PUK_REQUIRED ICC card state: Locked: requires the user's UIM PUK to unlock
int ICC_STATE_READY ICC card state: Ready
int ICC_STATE_UNKNOWN ICC card state: Unknown.
int ICC_TYPE_2G ICC type is 2G SIM
int ICC_TYPE_3G ICC type is 3G SIM
int ICC_TYPE_NO_ICC ICC type is No SIM
int ICC_TYPE_SIM ICC card type: SIM
int ICC_TYPE_SUB_ICC
int ICC_TYPE_TITAN_LITE_SIM_CARD ICC type is Titan Lite SIM
int ICC_TYPE_UIM ICC card type: UIM
int ICC_TYPE_UNKNOW ICC card type: UNKNOW
int ICC_TYPE_UNKNOWN ICC type is unknown
int PHONE_TYPE_CDMA Phone radio is CDMA.
int PHONE_TYPE_GSM Phone radio is GSM.
String PHONE_TYPE_KEY
int PHONE_TYPE_NONE No phone radio.
int PHONE_TYPE_SIP Phone is via SIP.
int PHONE_TYPE_SUB_GSM
int PRECISE_CALL_STATE_ACTIVE
int PRECISE_CALL_STATE_ALERTING
int PRECISE_CALL_STATE_DIALING
int PRECISE_CALL_STATE_DISCONNECTED
int PRECISE_CALL_STATE_DISCONNECTING
int PRECISE_CALL_STATE_HOLDING
int PRECISE_CALL_STATE_IDLE
int PRECISE_CALL_STATE_INCOMING
int PRECISE_CALL_STATE_WAITING
int SECTOR_ID_NETWORK_EHRPD
int SECTOR_ID_NETWORK_LTE
int SIM_STATE_ABSENT SIM card state: no SIM card is available in the device
int SIM_STATE_NETWORK_LOCKED SIM card state: Locked: requries a network PIN to unlock
int SIM_STATE_PIN_REQUIRED SIM card state: Locked: requires the user's SIM PIN to unlock
int SIM_STATE_PUK_REQUIRED SIM card state: Locked: requires the user's SIM PUK to unlock
int SIM_STATE_READY SIM card state: Ready
int SIM_STATE_UNKNOWN SIM card state: Unknown.
int STATE_EMERGENCY_ONLY
int STATE_IN_SERVICE
int STATE_NETWORK_SEARCHING
int STATE_OUT_OF_SERVICE
int STATE_POWER_OFF
int UIM_STATE_ABSENT ICC card state: no uim card is available in the device
int UIM_STATE_NETWORK_LOCKED ICC card state: Locked: requries a network PIN to unlock
int UIM_STATE_PIN_REQUIRED ICC card state: Locked: requires the user's UIM PIN to unlock
int UIM_STATE_PUK_REQUIRED ICC card state: Locked: requires the user's UIM PUK to unlock
int UIM_STATE_READY ICC card state: Ready
int UIM_STATE_UNKNOWN
Public Methods
void ExitCDMAEmergencyMode()
Exit CDMA Emergency callback mode.
Bundle akaAuthentication(byte[] rand, byte[] autn)
Bundle calculateAkaResponse(byte[] rand, byte[] autn)
Bundle calculateGbaBootstrappingResponse(byte[] rand, byte[] autn)
byte[] calculateNafExternalKey(byte[] nafId)
void cancelMissedCallsNotification()
boolean changeUserSettingLTE(boolean value)
boolean checkTestIcc()
boolean clearCdmaSysRecordContent()
boolean closeIccLogicalChannel(int channel)
void confirmFirstDataRoaming()
Authorize data roaming after radio had been turnned on.
boolean dialWithoutDelay(Intent intent)
static boolean dualGSMPhoneEnable()
static boolean dualPhoneEnable()
boolean enableLTENetwork(boolean value)
void enableMpdp(boolean enable)
void enablePS_W2G_Handover(int enable)
void enableRegistrationState_wifi_call(boolean on)
void enableRegistrationState_wifi_call_ext(boolean on, int phoneType)
long getActiveCallConnectTime()
String getActiveCallNumber()
String[] getActivePDPList()
String getBackgroundCallNumber()
String getCFUNumber()
String getCFUNumberFromOperator()
int getCallStateExt(int phoneType)
Returns a constant indicating the call state (cellular) on the device.
int getCardCheckedState()
String getCdmaMin()
Retrieves the CDMA MIN(Mobile Identification Number) of the device
boolean getCdmaSmartNetworkStatus()
Query the CDMA Smart Network service if be enabled or not.
int[][] getCdmaSysRecordContent(int index, int number)
int getCdmaSysRecordSize()
CellLocation getCellLocationExt(int phoneType)
Returns the current location of the device.
String getCompleteVoiceMailNumberExt(int phoneType)
Returns the complete voice mail number.
long getCurrentActiveCallDuration()
int getCurrentCallState()
int getDataActivityExt(int phoneType)
Returns a constant indicating the type of activity on a data connection (cellular).
int getDataStateExt(int phoneType)
Returns a constant indicating the current data connection state (cellular).
static int getDefMainPhoneType()
Returns the main phone type
static int getDefSubPhoneType()
Returns the main phone type
static HtcTelephonyManager getDefault()
static int getDefaultPhoneType()
int[] getDetailIccStatus()
Get the SIM detail status, which means, how many pin1/puk1/pin2/puk2 retry count(s) left.
int[] getDetailIccStatusExt(int phoneType)
String getDeviceIdExt(int phoneType)
Returns the unique device ID, for example, the IMEI for GSM and the MEID or ESN for CDMA phones.
String getDeviceSoftwareVersionExt(int phoneType)
Returns the software version number for the device, for example, the IMEI/SV for GSM phones.
int[] getDrxInfo()
String getEsn()
Retrieves the ESN(Electronic Serial Number) of the device
int getGlobalDataRoamingOption()
int getGprsState()
get if GPRS attached, STATE_IN_SERVICE means attached, otherwise, detached.
int getGprsStateExt(int phoneType)
String getGsmNetworkType()
String getHtcDeviceId(String account)
Retrieves the unique device ID, e.g., IMEI for GSM phones.
String getHtcDeviceSvn(String account)
Retrieves the software version number for the device, e.g., IMEI/SV for GSM phones.
String getHtcIccSerialNumber(String account)
Retrieves the serial number of the ICC, if applicable.
String getHtcLine1AlphaTag(String account)
Retrieves the alpha identifier for line 1.
String getHtcLine1Number(String account)
Retrieves the phone number string for line 1.
int getHtcNetworkType(String[] stack)
Returns the HTC network type
int getHtcServiceStateExt(int phoneType)
String getHtcSubscriberId(String account)
Retrieves the unique sbuscriber ID, e.g., IMSI for GSM phones.
String getHtcVoiceMailAlphaTag(String account)
Retrieves the alpha identifier associated with the voice mail number.
String getHtcVoiceMailNumber(String account)
Retrieves the voice mail number.
String getIccCountryIso(int iccType)
Returns the ISO country code equivalent for the ICC card provider's country code.
String getIccOperator(int iccType)
Returns the MCC+MNC (mobile country code + mobile network code) of the provider of the SIM.
String getIccOperatorName(int iccType)
Returns the Service Provider Name (SPN).
String getIccSerialNumber(int iccType)
Returns the serial number of the ICC card, if applicable.
int getIccState(int iccType)
Returns a constant indicating the state of the device ICC card.
int getIccType()
String getIncallRecordingFileName()
Get a suitable file name for current incall recording.
String getKddiUserAgent()
int getLTELastErrorCode()
int getLastError()
String getLine1NumberExt(int phoneType)
Returns the phone number string for line 1, for example, the MSISDN for a GSM phone.
static int getMainPhoneType()
Returns the main phone type
List<NeighboringCellInfo> getNeighboringCellInfoExt(int phoneType)
Returns the neighboring cell information of the device.
String getNetworkOperatorExt(int phoneType)
Returns the numeric name (MCC+MNC) of current registered operator.
String getNetworkOperatorNameExt(int phoneType)
Returns the alphabetic name of current registered operator.
int getNetworkTypeExt(int phoneType)
Returns a constant indicating the radio technology (network type) currently in use on the device.
String getPdnSettings(int profileSlot)
String[] getPdnSettings2(String[] profile)
Bundle getPhoneState()
static int getPhoneTypeByName(String phoneName)
int[] getPowerInfo()
boolean getPowerKeyFlag()
int getPreferredNetworkType()
Get and Set Preferred network type
boolean getScreenBusyState()
String getSectorId(int requestedNetworkType)
Returns the sector_id of the specified network type.
int getServiceState()
get the current Network Service.
static int getSubPhoneType()
Returns the sub phone type
String getSubscriberIdExt(int phoneType)
Returns the unique subscriber ID, for example, the IMSI for a GSM phone.
int getSubsidyLockTypes()
get remaining subsidy lock type(s) waiting to be un-locked
String getUSSDVerificationStatus()
String[] getUSSDVerificationStrings()
int getUimState()
boolean getVTLoopBackMode()
boolean getVTSimulatedMode()
String getVoiceMailAlphaTagExt(int phoneType)
Retrieves the alphabetic identifier associated with the voice mail number.
String getVoiceMailNumberExt(int phoneType)
Returns the voice mail number.
Bundle gsmAuthentication(byte[] rand)
boolean handlePinMmi(String dialString, int phoneType)
boolean hasIccCardExt(int phoneType)
boolean hasVTCall()
String hello_getDeviceId()
boolean htcCdmaEndCall()
function for CDMA hangup call from hardware key
void htcCdmaExitRadioPowerSaveMode()
function for leaving CDMA power save mode
boolean htcModemLinkOn()
function for getting modem link status
boolean isCallWaiting()
boolean isCatServiceReady()
static boolean isDefMainPhone(int phoneType)
boolean isEnableLTENetwork()
long isEnterCDMAEmergencyMode()
Check device is into CDMA Emergency callback Mode or not.
boolean isFdnEnabled()
boolean isInService(int phoneType)
static boolean isMainPhone(int phoneType)
boolean isNetworkRoamingExt(int phoneType)
Returns true if the device is considered roaming on the current network, for GSM purposes.
boolean isUimPinEnabled()
boolean isUserSettingLTE()
static boolean isValidPhoneType(int phoneType)
void notifyKeyEvent(int keyCode)
void notifyScreenBusy(boolean busy)
void onCmdResponse(CatResponseMessage resMsg)
void onHandleEventList(int event, boolean enable)
void onLanguageEvent(String language)
int openIccLogicalChannel(String AID)
void performEndCall()
void performHtcPhoneAction(int action)
void performHtcPhoneActionExt(int action, int phoneType)
String plusCodeTranslationPrefix(int phoneType)
int queryCAVE()
int queryMD5()
int querySSDUpdate()
int queryUIMAUTH()
int queryVPM()
String requestCAVE(String randu)
void requestCW_UW_DREG()
void requestCW_UW_REG()
void requestClearLocProcessDB()
boolean requestClearLocProcessDB_EXT()
void requestConfigLocProcessDB(int enable, int num_neighbor_pilot, int num_record, int time)
boolean requestConfigLocProcessDB_EXT(int enable, int num_neighbor_pilot, int num_record, int time)
int requestEhrpdDomainNameChangeState()
String requestGetBtid()
void requestGetCurrentLoc()
int[] requestGetCurrentLoc_EXT()
String requestGetDOMAIN()
int requestGetEhrpdDeviceCapability()
int requestGetEhrpdDisableCapability()
String requestGetGID1()
String requestGetGID1Ext(int phoneType)
boolean requestGetHasISIM()
String requestGetIMPI()
String[] requestGetIMPU()
String requestGetIMSI(String phonetype)
boolean requestGetIsGBASupported()
String requestGetKeyLifetime()
int[] requestGetLTERFBandInfo()
int[] requestGetLTETxRxInfo()
String requestGetMobileNumber(String phonetype)
Bundle requestGetPCSCF()
String[] requestGetPCSCFAddress(String ifc_name)
byte[] requestGetRand()
int requestGetSIMType()
int requestGetVolteSipRegFailure()
String[] requestGetWimaxNai()
String requestISIMRead(int command, int field, int p1, int p2, int p3)
Bundle requestImsAkaAuthentication(String data)
boolean requestLtePermanentlyDetached()
String requestMD5(String chapid, String chapchallengelength, String chpachallenge)
boolean requestQueryISIMSupported()
boolean requestResetWSIMState()
String requestSSDUpdate(String randssd)
String requestSSDUpdateConfirm(String authbs)
void requestSetEhrpdDisableCapability(int ehrpdmode)
Request for the AT+HTC_EHRPD_DISABLE: Indicates eHRPD disable and restore the capability.
void requestSetFastDormancy(int module, int mode)
String requestSetISIMAUTH(String command)
void requestSetLBSNTFY(int lbsvalue)
void requestSetLocProcessDB(int index, int rat, int sid, int nid, int base_id, int pilot_pn, int[] neighbor_pilot_list)
boolean requestSetLocProcessDB_EXT(int index, int rat, int sid, int nid, int base_id, int pilot_pn, int[] neighbor_pilot_list)
void requestSetMultiRABTrafficThrottling(int module, int mode)
String requestVPM()
void resetPdnForSettingsChange()
void resetPdnForSettingsChange2()
void sendAT_BRIC()
void sendAT_PushMail(int type, int value)
String[] sendAllowedCSIMCommand(String command)
byte[] sendCmmbAuth3GReq(byte[] szRAND, byte[] szAUTN)
byte[] sendCmmbAuthGSMReq(byte[] szRAND)
Object sendKddiSmsDeliver(byte[] data)
void sendLanguageChange(int languageCode)
boolean sendMTRejectMessage(String number)
boolean sendMTRejectMessageExt(String number, int phoneType)
boolean setCFUNumber(boolean enable, String dialNumber)
boolean setCdmaSmartNetwork(boolean enable)
Enable or disable CDMA SMART Network service.
void setGbaBootstrappingParams(byte[] rand, String btid, String keyLifetime)
void setGlobalDataRoamingOption(int value)
void setKddiOtaStatus(int status)
static void setMainPhoneType(int phoneType)
void setPdnSettings(int profileSlot, String settings)
void setPdnSettings2(String[] profile)
void setPowerKeyFlag()
void setPreferredNetworkType(int type)
boolean setPreferredNetworkType_wifi_call(int networkType)
static void setSubPhoneType(int phoneType)
void setTimeZone(boolean sign, int offset)
If you want to change the time zone setting of modem, use this.
void setUSSDVerificationStatus(String status)
void setUSSDVerificationStrings(String ussd, String hexCode, String digits)
void setVTLoopBackMode(boolean enable)
void setVTSimulatedMode(boolean enable)
void showIncallScreen()
boolean supplyPinExt(String pin, int phoneType)
boolean supplyPukExt(String puk, String newpin, int phoneType)
boolean supplySubsidyLockPin(String type, String pin)
Supply a pin to unlock the subsidy locked state.
void switchHoldAndActiveCall()
String transmitIccBasicChannel(int cla, int command, int p1, int p2, int p3, String data)
String transmitIccLogicalChannel(int cla, int command, int channel, int p1, int p2, int p3, String data)
byte[] transmitIccSimIO(int fileID, int command, int p1, int p2, int p3, String filePath)
boolean unBlockPin(String puk, String newpin)
void updateRegDregState(int state, int expire)
void updateRegDregState(int state)
void updateSipInviteState(int result, String ip, String port, String streamId)
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String ACTION_PHONE_STATE_CHANGED_EXT

Constant Value: "android.intent.action.PHONE_STATE_EXT"

public static final int ICC_STATE_ABSENT

ICC card state: no uim card is available in the device

Constant Value: 1 (0x00000001)

public static final int ICC_STATE_NETWORK_LOCKED

ICC card state: Locked: requries a network PIN to unlock

Constant Value: 4 (0x00000004)

public static final int ICC_STATE_PIN_REQUIRED

ICC card state: Locked: requires the user's UIM PIN to unlock

Constant Value: 2 (0x00000002)

public static final int ICC_STATE_PUK_REQUIRED

ICC card state: Locked: requires the user's UIM PUK to unlock

Constant Value: 3 (0x00000003)

public static final int ICC_STATE_READY

ICC card state: Ready

Constant Value: 5 (0x00000005)

public static final int ICC_STATE_UNKNOWN

ICC card state: Unknown. Signifies that the ICC card is in transition between states. For example, when the user inputs the ICC card pin under PIN_REQUIRED state, a query for uim status returns this state before turning to ICC_STATE_READY.

Constant Value: 0 (0x00000000)

public static final int ICC_TYPE_2G

ICC type is 2G SIM

Constant Value: 2 (0x00000002)

public static final int ICC_TYPE_3G

ICC type is 3G SIM

Constant Value: 3 (0x00000003)

public static final int ICC_TYPE_NO_ICC

ICC type is No SIM

Constant Value: 1 (0x00000001)

public static final int ICC_TYPE_SIM

ICC card type: SIM

Constant Value: 1 (0x00000001)

public static final int ICC_TYPE_SUB_ICC

Constant Value: 3 (0x00000003)

public static final int ICC_TYPE_TITAN_LITE_SIM_CARD

ICC type is Titan Lite SIM

Constant Value: 4 (0x00000004)

public static final int ICC_TYPE_UIM

ICC card type: UIM

Constant Value: 2 (0x00000002)

public static final int ICC_TYPE_UNKNOW

ICC card type: UNKNOW

Constant Value: 0 (0x00000000)

public static final int ICC_TYPE_UNKNOWN

ICC type is unknown

Constant Value: 0 (0x00000000)

public static final int PHONE_TYPE_CDMA

Phone radio is CDMA.

Constant Value: 2 (0x00000002)

public static final int PHONE_TYPE_GSM

Phone radio is GSM.

Constant Value: 1 (0x00000001)

public static final String PHONE_TYPE_KEY

Constant Value: "phone_type"

public static final int PHONE_TYPE_NONE

No phone radio.

Constant Value: 0 (0x00000000)

public static final int PHONE_TYPE_SIP

Phone is via SIP.

Constant Value: 3 (0x00000003)

public static final int PHONE_TYPE_SUB_GSM

Constant Value: 5 (0x00000005)

public static final int PRECISE_CALL_STATE_ACTIVE

Constant Value: 2 (0x00000002)

public static final int PRECISE_CALL_STATE_ALERTING

Constant Value: 5 (0x00000005)

public static final int PRECISE_CALL_STATE_DIALING

Constant Value: 4 (0x00000004)

public static final int PRECISE_CALL_STATE_DISCONNECTED

Constant Value: 8 (0x00000008)

public static final int PRECISE_CALL_STATE_DISCONNECTING

Constant Value: 9 (0x00000009)

public static final int PRECISE_CALL_STATE_HOLDING

Constant Value: 3 (0x00000003)

public static final int PRECISE_CALL_STATE_IDLE

Constant Value: 1 (0x00000001)

public static final int PRECISE_CALL_STATE_INCOMING

Constant Value: 6 (0x00000006)

public static final int PRECISE_CALL_STATE_WAITING

Constant Value: 7 (0x00000007)

public static final int SECTOR_ID_NETWORK_EHRPD

Constant Value: 0 (0x00000000)

public static final int SECTOR_ID_NETWORK_LTE

Constant Value: 1 (0x00000001)

public static final int SIM_STATE_ABSENT

SIM card state: no SIM card is available in the device

Constant Value: 1 (0x00000001)

public static final int SIM_STATE_NETWORK_LOCKED

SIM card state: Locked: requries a network PIN to unlock

Constant Value: 4 (0x00000004)

public static final int SIM_STATE_PIN_REQUIRED

SIM card state: Locked: requires the user's SIM PIN to unlock

Constant Value: 2 (0x00000002)

public static final int SIM_STATE_PUK_REQUIRED

SIM card state: Locked: requires the user's SIM PUK to unlock

Constant Value: 3 (0x00000003)

public static final int SIM_STATE_READY

SIM card state: Ready

Constant Value: 5 (0x00000005)

public static final int SIM_STATE_UNKNOWN

SIM card state: Unknown. Signifies that the SIM is in transition between states. For example, when the user inputs the SIM pin under PIN_REQUIRED state, a query for sim status returns this state before turning to SIM_STATE_READY.

Constant Value: 0 (0x00000000)

public static final int STATE_EMERGENCY_ONLY

Constant Value: 2 (0x00000002)

public static final int STATE_IN_SERVICE

Constant Value: 0 (0x00000000)

public static final int STATE_NETWORK_SEARCHING

Constant Value: 4 (0x00000004)

public static final int STATE_OUT_OF_SERVICE

Constant Value: 1 (0x00000001)

public static final int STATE_POWER_OFF

Constant Value: 3 (0x00000003)

public static final int UIM_STATE_ABSENT

ICC card state: no uim card is available in the device

Constant Value: 1 (0x00000001)

public static final int UIM_STATE_NETWORK_LOCKED

ICC card state: Locked: requries a network PIN to unlock

Constant Value: 4 (0x00000004)

public static final int UIM_STATE_PIN_REQUIRED

ICC card state: Locked: requires the user's UIM PIN to unlock

Constant Value: 2 (0x00000002)

public static final int UIM_STATE_PUK_REQUIRED

ICC card state: Locked: requires the user's UIM PUK to unlock

Constant Value: 3 (0x00000003)

public static final int UIM_STATE_READY

ICC card state: Ready

Constant Value: 5 (0x00000005)

public static final int UIM_STATE_UNKNOWN

Constant Value: 0 (0x00000000)

Public Methods

public void ExitCDMAEmergencyMode ()

Exit CDMA Emergency callback mode.

public Bundle akaAuthentication (byte[] rand, byte[] autn)

public Bundle calculateAkaResponse (byte[] rand, byte[] autn)

public Bundle calculateGbaBootstrappingResponse (byte[] rand, byte[] autn)

public byte[] calculateNafExternalKey (byte[] nafId)

public void cancelMissedCallsNotification ()

public boolean changeUserSettingLTE (boolean value)

Since: API Level

public boolean checkTestIcc ()

public boolean clearCdmaSysRecordContent ()

public boolean closeIccLogicalChannel (int channel)

public void confirmFirstDataRoaming ()

Authorize data roaming after radio had been turnned on.

public boolean dialWithoutDelay (Intent intent)

public static boolean dualGSMPhoneEnable ()

public static boolean dualPhoneEnable ()

public boolean enableLTENetwork (boolean value)

public void enableMpdp (boolean enable)

public void enablePS_W2G_Handover (int enable)

public void enableRegistrationState_wifi_call (boolean on)

public void enableRegistrationState_wifi_call_ext (boolean on, int phoneType)

public long getActiveCallConnectTime ()

public String getActiveCallNumber ()

public String[] getActivePDPList ()

public String getBackgroundCallNumber ()

public String getCFUNumber ()

public String getCFUNumberFromOperator ()

public int getCallStateExt (int phoneType)

Returns a constant indicating the call state (cellular) on the device.

public int getCardCheckedState ()

public String getCdmaMin ()

Retrieves the CDMA MIN(Mobile Identification Number) of the device

public boolean getCdmaSmartNetworkStatus ()

Query the CDMA Smart Network service if be enabled or not. The SMART Network was support on specific CDMA project.

Returns
  • true: service is enabled ; false: not be enabled.

public int[][] getCdmaSysRecordContent (int index, int number)

public int getCdmaSysRecordSize ()

public CellLocation getCellLocationExt (int phoneType)

Returns the current location of the device. Return null if current location is not available.

Requires Permission: ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION.

public String getCompleteVoiceMailNumberExt (int phoneType)

Returns the complete voice mail number. Return null if it is unavailable.

Requires Permission: CALL_PRIVILEGED

public long getCurrentActiveCallDuration ()

public int getCurrentCallState ()

public int getDataActivityExt (int phoneType)

Returns a constant indicating the type of activity on a data connection (cellular).

See Also
  • #DATA_ACTIVITY_NONE
  • #DATA_ACTIVITY_IN
  • #DATA_ACTIVITY_OUT
  • #DATA_ACTIVITY_INOUT
  • #DATA_ACTIVITY_DORMANT

public int getDataStateExt (int phoneType)

Returns a constant indicating the current data connection state (cellular).

See Also
  • #DATA_DISCONNECTED
  • #DATA_CONNECTING
  • #DATA_CONNECTED
  • #DATA_SUSPENDED

public static int getDefMainPhoneType ()

Returns the main phone type

public static int getDefSubPhoneType ()

Returns the main phone type

public static HtcTelephonyManager getDefault ()

public static int getDefaultPhoneType ()

public int[] getDetailIccStatus ()

Get the SIM detail status, which means, how many pin1/puk1/pin2/puk2 retry count(s) left.

Returns
  • int[0]: pin1 retry count(s) left, int[1]: puk1 retry count(s) left, int[2]: pin2 retry count(s) left, int[3]: puk2 retry count(s) left

public int[] getDetailIccStatusExt (int phoneType)

public String getDeviceIdExt (int phoneType)

Returns the unique device ID, for example, the IMEI for GSM and the MEID or ESN for CDMA phones. Return null if device ID is not available.

Requires Permission: READ_PHONE_STATE

public String getDeviceSoftwareVersionExt (int phoneType)

Returns the software version number for the device, for example, the IMEI/SV for GSM phones. Return null if the software version is not available.

Requires Permission: READ_PHONE_STATE

public int[] getDrxInfo ()

public String getEsn ()

Retrieves the ESN(Electronic Serial Number) of the device

public int getGlobalDataRoamingOption ()

public int getGprsState ()

get if GPRS attached, STATE_IN_SERVICE means attached, otherwise, detached.

public int getGprsStateExt (int phoneType)

public String getGsmNetworkType ()

public String getHtcDeviceId (String account)

Retrieves the unique device ID, e.g., IMEI for GSM phones.

public String getHtcDeviceSvn (String account)

Retrieves the software version number for the device, e.g., IMEI/SV for GSM phones.

public String getHtcIccSerialNumber (String account)

Retrieves the serial number of the ICC, if applicable.

public String getHtcLine1AlphaTag (String account)

Retrieves the alpha identifier for line 1.

public String getHtcLine1Number (String account)

Retrieves the phone number string for line 1.

public int getHtcNetworkType (String[] stack)

Returns the HTC network type

public int getHtcServiceStateExt (int phoneType)

public String getHtcSubscriberId (String account)

Retrieves the unique sbuscriber ID, e.g., IMSI for GSM phones.

public String getHtcVoiceMailAlphaTag (String account)

Retrieves the alpha identifier associated with the voice mail number.

public String getHtcVoiceMailNumber (String account)

Retrieves the voice mail number.

public String getIccCountryIso (int iccType)

Returns the ISO country code equivalent for the ICC card provider's country code.

public String getIccOperator (int iccType)

Returns the MCC+MNC (mobile country code + mobile network code) of the provider of the SIM. 5 or 6 decimal digits.

Availability: ICC card state must be ICC_STATE_READY

See Also
  • #getSimState

public String getIccOperatorName (int iccType)

Returns the Service Provider Name (SPN).

Availability: ICC card state must be ICC_STATE_READY

See Also
  • #getSimState

public String getIccSerialNumber (int iccType)

Returns the serial number of the ICC card, if applicable. Return null if it is unavailable.

Requires Permission: READ_PHONE_STATE

public int getIccState (int iccType)

public int getIccType ()

Returns
  • ICC type

public String getIncallRecordingFileName ()

Get a suitable file name for current incall recording. The file name could be null if it is illegal state.

Returns
  • The file name.

public String getKddiUserAgent ()

public int getLTELastErrorCode ()

public int getLastError ()

public String getLine1NumberExt (int phoneType)

Returns the phone number string for line 1, for example, the MSISDN for a GSM phone. Return null if it is unavailable.

Requires Permission: READ_PHONE_STATE

public static int getMainPhoneType ()

Returns the main phone type

public List<NeighboringCellInfo> getNeighboringCellInfoExt (int phoneType)

Returns the neighboring cell information of the device.

Returns
  • List of NeighboringCellInfo or null if info unavailable.

    Requires Permission: (@link android.Manifest.permission#ACCESS_COARSE_UPDATES}

public String getNetworkOperatorExt (int phoneType)

Returns the numeric name (MCC+MNC) of current registered operator.

Availability: Only when user is registered to a network. Result may be unreliable on CDMA networks (use #getPhoneType() to determine if on a CDMA network).

public String getNetworkOperatorNameExt (int phoneType)

Returns the alphabetic name of current registered operator.

Availability: Only when user is registered to a network. Result may be unreliable on CDMA networks (use #getPhoneType() to determine if on a CDMA network).

public int getNetworkTypeExt (int phoneType)

Returns a constant indicating the radio technology (network type) currently in use on the device.

Returns
  • the network type
See Also
  • #NETWORK_TYPE_UNKNOWN
  • #NETWORK_TYPE_GPRS
  • #NETWORK_TYPE_EDGE
  • #NETWORK_TYPE_UMTS
  • #NETWORK_TYPE_HSDPA
  • #NETWORK_TYPE_HSUPA
  • #NETWORK_TYPE_HSPA
  • #NETWORK_TYPE_CDMA
  • #NETWORK_TYPE_EVDO_0
  • #NETWORK_TYPE_EVDO_A
  • #NETWORK_TYPE_EVDO_B
  • #NETWORK_TYPE_1xRTT

public String getPdnSettings (int profileSlot)

public String[] getPdnSettings2 (String[] profile)

public Bundle getPhoneState ()

public static int getPhoneTypeByName (String phoneName)

Parameters
phoneName The phone name see com.android.internal.telephony.Phone.PHONE_NAME_GSM see com.android.internal.telephony.Phone.PHONE_NAME_CDMA see com.android.internal.telephony.Phone.PHONE_NAME_SIP Returns the phone type is valid or not

public int[] getPowerInfo ()

public boolean getPowerKeyFlag ()

public int getPreferredNetworkType ()

Get and Set Preferred network type

public boolean getScreenBusyState ()

public String getSectorId (int requestedNetworkType)

Returns the sector_id of the specified network type.

Parameters
requestedNetworkType Possible network types: eHRPD SECTOR_ID_NETWORK_EHRPD LTE SECTOR_ID_NETWORK_LTE
Returns
  • the sector_id strng.

public int getServiceState ()

get the current Network Service.

public static int getSubPhoneType ()

Returns the sub phone type

public String getSubscriberIdExt (int phoneType)

Returns the unique subscriber ID, for example, the IMSI for a GSM phone. Return null if it is unavailable.

Requires Permission: READ_PHONE_STATE

public int getSubsidyLockTypes ()

get remaining subsidy lock type(s) waiting to be un-locked

Returns
  • subsidy lock types remain to unlock.

public String getUSSDVerificationStatus ()

public String[] getUSSDVerificationStrings ()

public int getUimState ()

public boolean getVTLoopBackMode ()

public boolean getVTSimulatedMode ()

public String getVoiceMailAlphaTagExt (int phoneType)

Retrieves the alphabetic identifier associated with the voice mail number.

Requires Permission: READ_PHONE_STATE

public String getVoiceMailNumberExt (int phoneType)

Returns the voice mail number. Return null if it is unavailable.

Requires Permission: READ_PHONE_STATE

public Bundle gsmAuthentication (byte[] rand)

Since: API Level

public boolean handlePinMmi (String dialString, int phoneType)

public boolean hasIccCardExt (int phoneType)

Returns
  • true if a ICC card is present

public boolean hasVTCall ()

public String hello_getDeviceId ()

public boolean htcCdmaEndCall ()

function for CDMA hangup call from hardware key

public void htcCdmaExitRadioPowerSaveMode ()

function for leaving CDMA power save mode

public boolean htcModemLinkOn ()

function for getting modem link status

public boolean isCallWaiting ()

public boolean isCatServiceReady ()

public static boolean isDefMainPhone (int phoneType)

Parameters
phoneType The phone type Returns the phone type is the type of default main phone or not

public boolean isEnableLTENetwork ()

public long isEnterCDMAEmergencyMode ()

Check device is into CDMA Emergency callback Mode or not.

Returns
  • Value > -1 means device is into CDMA Emergency callback Mode and the value also means the countdown timer(ms) during ECC mode; Otherwise, device is not in ECC mode.

public boolean isFdnEnabled ()

public boolean isInService (int phoneType)

public static boolean isMainPhone (int phoneType)

Parameters
phoneType The phone type Returns the phone type is the type of main phone or not

public boolean isNetworkRoamingExt (int phoneType)

Returns true if the device is considered roaming on the current network, for GSM purposes.

Availability: Only when user registered to a network.

public boolean isUimPinEnabled ()

public boolean isUserSettingLTE ()

Since: API Level

public static boolean isValidPhoneType (int phoneType)

Parameters
phoneType The phone type Returns the phone type is valid or not

public void notifyKeyEvent (int keyCode)

public void notifyScreenBusy (boolean busy)

public void onCmdResponse (CatResponseMessage resMsg)

public void onHandleEventList (int event, boolean enable)

public void onLanguageEvent (String language)

public int openIccLogicalChannel (String AID)

public void performEndCall ()

public void performHtcPhoneAction (int action)

public void performHtcPhoneActionExt (int action, int phoneType)

public String plusCodeTranslationPrefix (int phoneType)

public int queryCAVE ()

public int queryMD5 ()

public int querySSDUpdate ()

public int queryUIMAUTH ()

public int queryVPM ()

public String requestCAVE (String randu)

public void requestCW_UW_DREG ()

public void requestCW_UW_REG ()

public void requestClearLocProcessDB ()

public boolean requestClearLocProcessDB_EXT ()

public void requestConfigLocProcessDB (int enable, int num_neighbor_pilot, int num_record, int time)

public boolean requestConfigLocProcessDB_EXT (int enable, int num_neighbor_pilot, int num_record, int time)

public int requestEhrpdDomainNameChangeState ()

public String requestGetBtid ()

public void requestGetCurrentLoc ()

public int[] requestGetCurrentLoc_EXT ()

public String requestGetDOMAIN ()

public int requestGetEhrpdDeviceCapability ()

public int requestGetEhrpdDisableCapability ()

public String requestGetGID1 ()

public String requestGetGID1Ext (int phoneType)

Since: API Level

public boolean requestGetHasISIM ()

public String requestGetIMPI ()

public String[] requestGetIMPU ()

public String requestGetIMSI (String phonetype)

public boolean requestGetIsGBASupported ()

public String requestGetKeyLifetime ()

public int[] requestGetLTERFBandInfo ()

public int[] requestGetLTETxRxInfo ()

public String requestGetMobileNumber (String phonetype)

public Bundle requestGetPCSCF ()

public String[] requestGetPCSCFAddress (String ifc_name)

public byte[] requestGetRand ()

public int requestGetSIMType ()

public int requestGetVolteSipRegFailure ()

public String[] requestGetWimaxNai ()

public String requestISIMRead (int command, int field, int p1, int p2, int p3)

public Bundle requestImsAkaAuthentication (String data)

public boolean requestLtePermanentlyDetached ()

public String requestMD5 (String chapid, String chapchallengelength, String chpachallenge)

public boolean requestQueryISIMSupported ()

public boolean requestResetWSIMState ()

public String requestSSDUpdate (String randssd)

public String requestSSDUpdateConfirm (String authbs)

public void requestSetEhrpdDisableCapability (int ehrpdmode)

Request for the AT+HTC_EHRPD_DISABLE: Indicates eHRPD disable and restore the capability. "ehrpdmode" is int ehrpdmode is 0 for The device is restoring to the previous eHRPD capability 1 for The device is disabling eHRPD capability "response" is NULL

public void requestSetFastDormancy (int module, int mode)

public String requestSetISIMAUTH (String command)

public void requestSetLBSNTFY (int lbsvalue)

public void requestSetLocProcessDB (int index, int rat, int sid, int nid, int base_id, int pilot_pn, int[] neighbor_pilot_list)

public boolean requestSetLocProcessDB_EXT (int index, int rat, int sid, int nid, int base_id, int pilot_pn, int[] neighbor_pilot_list)

public void requestSetMultiRABTrafficThrottling (int module, int mode)

public String requestVPM ()

public void resetPdnForSettingsChange ()

public void resetPdnForSettingsChange2 ()

public void sendAT_BRIC ()

public void sendAT_PushMail (int type, int value)

public String[] sendAllowedCSIMCommand (String command)

public byte[] sendCmmbAuth3GReq (byte[] szRAND, byte[] szAUTN)

public byte[] sendCmmbAuthGSMReq (byte[] szRAND)

public Object sendKddiSmsDeliver (byte[] data)

public void sendLanguageChange (int languageCode)

public boolean sendMTRejectMessage (String number)

public boolean sendMTRejectMessageExt (String number, int phoneType)

public boolean setCFUNumber (boolean enable, String dialNumber)

public boolean setCdmaSmartNetwork (boolean enable)

Enable or disable CDMA SMART Network service. The SMART Network was support on specific CDMA project.

Parameters
enable Enable or disable SMART Network.
Returns
  • Enable SMART Network service success or not.

public void setGbaBootstrappingParams (byte[] rand, String btid, String keyLifetime)

public void setGlobalDataRoamingOption (int value)

public void setKddiOtaStatus (int status)

public static void setMainPhoneType (int phoneType)

public void setPdnSettings (int profileSlot, String settings)

public void setPdnSettings2 (String[] profile)

public void setPowerKeyFlag ()

public void setPreferredNetworkType (int type)

public boolean setPreferredNetworkType_wifi_call (int networkType)

public static void setSubPhoneType (int phoneType)

public void setTimeZone (boolean sign, int offset)

If you want to change the time zone setting of modem, use this. ex: GMT+8 setTimeZone(true, 28800)

Parameters
sign The offset is + or -.
offset The time offset in seconds unit.

public void setUSSDVerificationStatus (String status)

public void setUSSDVerificationStrings (String ussd, String hexCode, String digits)

public void setVTLoopBackMode (boolean enable)

public void setVTSimulatedMode (boolean enable)

public void showIncallScreen ()

public boolean supplyPinExt (String pin, int phoneType)

public boolean supplyPukExt (String puk, String newpin, int phoneType)

public boolean supplySubsidyLockPin (String type, String pin)

Supply a pin to unlock the subsidy locked state. Blocks until a result is determined.

Parameters
type The type to unlock.
pin The pin to check.
Returns
  • whether the operation was a success.

public void switchHoldAndActiveCall ()

public String transmitIccBasicChannel (int cla, int command, int p1, int p2, int p3, String data)

public String transmitIccLogicalChannel (int cla, int command, int channel, int p1, int p2, int p3, String data)

public byte[] transmitIccSimIO (int fileID, int command, int p1, int p2, int p3, String filePath)

public boolean unBlockPin (String puk, String newpin)

public void updateRegDregState (int state, int expire)

public void updateRegDregState (int state)

public void updateSipInviteState (int result, String ip, String port, String streamId)