This API is available on Firefox OS for internal applications 仅。
MozIccManager
interface gives access to
ICC
related functionalities.
ICC related functionalities are known as the SIM Application Toolkit (STK) and are a set of applications built in to the SIM card. It provide basic functionalities for any phone (SMS, Contact, Tone ring change, etc.) In many cases, SmartPhones prefer to provide visual apps to access the same set of functionalities.
callback EventHandler = any (Event event); interfaceMozIccManager: EventTarget { DOMRequest iccCloseChannel(long channel); DOMRequest iccExchangeAPDU(long channel, object apdu); DOMRequest iccOpenChannel(DOMString aid); void sendStkEventDownload(object event); void sendStkMenuSelection(unsigned short itemIdentifier, boolean helpRequested); void sendStkResponse(object command, object respond); void sendStkTimerExpiration(in jsval timer); DOMRequest updateContact(DOMString contactType, Contact contact, optional DOMString pin2); DOMRequest getCardLock(DOMString lockType); DOMRequest unlockCardLock(object info); DOMRequest setCardLock(object info); readonly attribute DOMString cardState; readonly attributeMozMobileICCInfoiccInfo; attribute EventHandler oncardstatechange; attribute EventHandler oniccinfochange; attribute EventHandler onstkcommand; attribute EventHandler onstksessionend; };
注意:
MozIccManager
defines many constants that are detailed hereafter but not present in this overview for clarity.
MozIccManager.cardState
只读
MozIccManager.iccInfo
只读
MozMobileICCInfo
object that gives access to information stored in the device's
ICC
card.
MozIccManager.oncardstatechange
cardstatechange
event. This event is fired when the
cardState
property changes value.
MozIccManager.oniccinfochange
iccinfochange
event. This event is fired whenever the
iccInfo
object changes.
MozIccManager.onstkcommand
只读
stkcommand
event. This event is notified whenever
STK
Proactive Command is issued from
ICC
.
MozIccManager.onstksessionend
只读
stksessionend
event. This event is notified whenever
STK
Session is terminated by
ICC
.
The MozIccManager defines many constants in order to provide an easy way to manage information from the STK . That information is provided as numbers so it's more convenient to have human readable constants to deal with them.
STK_MENU_TYPE_NOT_SPECIFIED
STK_MENU_TYPE_DATA_VALUES
STK_MENU_TYPE_NAVIGATION_OPTIONS
STK_BROWSER_MODE_LAUNCH_IF_NOT_ALREADY_LAUNCHED
STK_BROWSER_MODE_USING_EXISTING_BROWSER
STK_BROWSER_MODE_USING_NEW_BROWSER
STK_CMD_REFRESH
STK_CMD_POLL_INTERVAL
STK_CMD_POLL_OFF
STK_CMD_SET_UP_EVENT_LIST
STK_CMD_SET_UP_CALL
STK_CMD_SEND_SS
STK_CMD_SEND_USSD
STK_CMD_SEND_SMS
STK_CMD_SEND_DTMF
STK_CMD_LAUNCH_BROWSER
STK_CMD_PLAY_TONE
STK_CMD_DISPLAY_TEXT
STK_CMD_GET_INKEY
STK_CMD_GET_INPUT
STK_CMD_SELECT_ITEM
STK_CMD_SET_UP_MENU
STK_CMD_PROVIDE_LOCAL_INFO
STK_CMD_TIMER_MANAGEMENT
STK_CMD_SET_UP_IDLE_MODE_TEXT
The following results indicate that the command has been performed.
STK_RESULT_OK
(Command performed successfully)
STK_RESULT_PRFRMD_WITH_PARTIAL_COMPREHENSION
(Command performed with partial comprehension)
STK_RESULT_PRFRMD_WITH_MISSING_INFO
(Command performed, with missing information)
STK_RESULT_PRFRMD_WITH_ADDITIONAL_EFS_READ
(REFRESH performed with additional EFs read)
STK_RESULT_PRFRMD_LIMITED_SERVICE
(Command performed successfully, limited service)
STK_RESULT_UICC_SESSION_TERM_BY_USER
(Proactive UICC session terminated by the user)
STK_RESULT_BACKWARD_MOVE_BY_USER
(Backward move in the proactive UICC session requested by the user)
STK_RESULT_NO_RESPONSE_FROM_USER
(No response from user)
STK_RESULT_HELP_INFO_REQUIRED
(Help information required by the user)
STK_RESULT_USSD_SS_SESSION_TERM_BY_USER
(USSD or SS transaction terminated by the user)
The following results indicate to the UICC that it may be worth re-trying the command at a later opportunity.
STK_RESULT_TERMINAL_CRNTLY_UNABLE_TO_PROCESS
(Terminal currently unable to process command)
STK_RESULT_NETWORK_CRNTLY_UNABLE_TO_PROCESS
(Network currently unable to process command)
STK_RESULT_USER_NOT_ACCEPT
(User did not accept the proactive command)
STK_RESULT_USER_CLEAR_DOWN_CALL
(User cleared down call before connection or network release)
STK_RESULT_LAUNCH_BROWSER_ERROR
(Launch browser generic error code)
The following results indicate that it is not worth the UICC re-trying with an identical command, as it will only get the same response. However, the decision to retry lies with the application.
STK_RESULT_BEYOND_TERMINAL_CAPABILITY
(Command beyond terminal's capabilities)
STK_RESULT_CMD_TYPE_NOT_UNDERSTOOD
(Command type not understood by terminal)
STK_RESULT_CMD_DATA_NOT_UNDERSTOOD
(Command data not understood by terminal)
STK_RESULT_CMD_NUM_NOT_KNOWN
(Command number not known by terminal)
STK_RESULT_SS_RETURN_ERROR
(SS Return Error)
STK_RESULT_SMS_RP_ERROR
(SMS RP-ERROR)
STK_RESULT_REQUIRED_VALUES_MISSING
(Error, required values are missing)
STK_RESULT_USSD_RETURN_ERROR
(USSD Return Error)
STK_RESULT_MULTI_CARDS_CMD_ERROR
(MultipleCard commands error)
Interaction with call control by USIM or MO short message control by USIM, permanent problem
STK_RESULT_USIM_CALL_CONTROL_PERMANENT
STK_RESULT_BIP_ERROR
(Bearer Independent Protocol error)
STK_EVENT_TYPE_MT_CALL
STK_EVENT_TYPE_CALL_CONNECTED
STK_EVENT_TYPE_CALL_DISCONNECTED
STK_EVENT_TYPE_LOCATION_STATUS
STK_EVENT_TYPE_USER_ACTIVITY
STK_EVENT_TYPE_IDLE_SCREEN_AVAILABLE
STK_EVENT_TYPE_CARD_READER_STATUS
STK_EVENT_TYPE_LANGUAGE_SELECTION
STK_EVENT_TYPE_BROWSER_TERMINATION
STK_EVENT_TYPE_DATA_AVAILABLE
STK_EVENT_TYPE_CHANNEL_STATUS
STK_EVENT_TYPE_SINGLE_ACCESS_TECHNOLOGY_CHANGED
STK_EVENT_TYPE_DISPLAY_PARAMETER_CHANGED
STK_EVENT_TYPE_LOCAL_CONNECTION
STK_EVENT_TYPE_NETWORK_SEARCH_MODE_CHANGED
STK_EVENT_TYPE_BROWSING_STATUS
STK_EVENT_TYPE_FRAMES_INFORMATION_CHANGED
STK_SERVICE_STATE_NORMAL
STK_SERVICE_STATE_LIMITED
STK_SERVICE_STATE_UNAVAILABLE
STK_TONE_TYPE_DIAL_TONE
STK_TONE_TYPE_CALLED_SUBSCRIBER_BUSY
STK_TONE_TYPE_CONGESTION
STK_TONE_TYPE_RADIO_PATH_ACK
STK_TONE_TYPE_RADIO_PATH_NOT_AVAILABLE
STK_TONE_TYPE_ERROR
STK_TONE_TYPE_CALL_WAITING_TONE
STK_TONE_TYPE_RINGING_TONE
STK_TONE_TYPE_GENERAL_BEEP
STK_TONE_TYPE_POSITIVE_ACK_TONE
STK_TONE_TYPE_NEGATIVE_ACK_TONE
STK_TIME_UNIT_MINUTE
STK_TIME_UNIT_SECOND
STK_TIME_UNIT_TENTH_SECOND
STK_LOCAL_INFO_LOCATION_INFO
STK_LOCAL_INFO_IMEI
STK_LOCAL_INFO_DATE_TIME_ZONE
STK_LOCAL_INFO_LANGUAGE
STK_TIMER_START
STK_TIMER_DEACTIVATE
STK_TIMER_GET_CURRENT_VALUE
MozIccManager.sendStkResponse()
MozIccManager.sendStkMenuSelection()
MozIccManager.sendStkTimerExpiration()
MozIccManager.sendStkEventDownload()
MozIccManager.updateContact()
MozIccManager.iccOpenChannel()
Send request to open a logical channel defined by its application identifier (AID).
MozIccManager.iccExchangeAPDU()
Interface used to communicate with an applet through the Application Data Protocol Units (APDUs).
MozIccManager.iccCloseChannel()
Send request to close the selected logical channel identified by its application identifier (AID).
MozIccManager.getCardLock()
MozIccManager.unlockCardLock()
Unlock a card lock.
MozIccManager.setCardLock()
Modify the state of a card lock.
MozIccManager
interface also inherits from the
EventTarget
接口。
EventTarget.addEventListener()
EventTarget
.
EventTarget.removeEventListener()
EventTarget
.
EventTarget.dispatchEvent()
EventTarget
.
Mozilla extensions for use by JS-implemented event targets to implement on* properties. See also WebIDL 绑定 .
Not part of any specification.
Archive
CFStateChangeEvent
DataErrorEvent
IccCardLockError
IccCardLockErrorEvent
MozCellBroadcastEvent
MozEmergencyCbModeEvent
MozIccManager
MozMobileCFInfo
MozMobileCellInfo
MozMobileConnection
MozMobileConnectionInfo
MozMobileICCInfo
MozMobileNetworkInfo
MozOtaStatusEvent
MozStkCommandEvent
USSDReceivedEvent