This API is available on Firefox OS for internal applications only.
The 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.
Interface overview
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; };
Note: MozIccManager defines many constants that are detailed hereafter but not present in this overview for clarity.
Properties
MozIccManager.cardStateRead only- A string that indicates the state of the device's ICC card.
MozIccManager.iccInfoRead only- A
MozMobileICCInfoobject that gives access to information stored in the device's ICC card. MozIccManager.oncardstatechange- A handler for the
cardstatechangeevent. This event is fired when thecardStateproperty changes value. MozIccManager.oniccinfochange- A handler for the
iccinfochangeevent. This event is fired whenever theiccInfoobject changes. MozIccManager.onstkcommandRead only- A handler for the
stkcommandevent. This event is notified whenever STK Proactive Command is issued from ICC. MozIccManager.onstksessionendRead only- A handler for the
stksessionendevent. This event is notified whenever STK Session is terminated by ICC.
Constants
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 Presentation types
STK_MENU_TYPE_NOT_SPECIFIEDSTK_MENU_TYPE_DATA_VALUESSTK_MENU_TYPE_NAVIGATION_OPTIONS
Browser launch mode
STK_BROWSER_MODE_LAUNCH_IF_NOT_ALREADY_LAUNCHEDSTK_BROWSER_MODE_USING_EXISTING_BROWSERSTK_BROWSER_MODE_USING_NEW_BROWSER
STK Proactive commands
STK_CMD_REFRESHSTK_CMD_POLL_INTERVALSTK_CMD_POLL_OFFSTK_CMD_SET_UP_EVENT_LISTSTK_CMD_SET_UP_CALLSTK_CMD_SEND_SSSTK_CMD_SEND_USSDSTK_CMD_SEND_SMSSTK_CMD_SEND_DTMFSTK_CMD_LAUNCH_BROWSERSTK_CMD_PLAY_TONESTK_CMD_DISPLAY_TEXTSTK_CMD_GET_INKEYSTK_CMD_GET_INPUTSTK_CMD_SELECT_ITEMSTK_CMD_SET_UP_MENUSTK_CMD_PROVIDE_LOCAL_INFOSTK_CMD_TIMER_MANAGEMENTSTK_CMD_SET_UP_IDLE_MODE_TEXT
STK Result code
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_PERMANENTSTK_RESULT_BIP_ERROR(Bearer Independent Protocol error)
STK Event List
STK_EVENT_TYPE_MT_CALLSTK_EVENT_TYPE_CALL_CONNECTEDSTK_EVENT_TYPE_CALL_DISCONNECTEDSTK_EVENT_TYPE_LOCATION_STATUSSTK_EVENT_TYPE_USER_ACTIVITYSTK_EVENT_TYPE_IDLE_SCREEN_AVAILABLESTK_EVENT_TYPE_CARD_READER_STATUSSTK_EVENT_TYPE_LANGUAGE_SELECTIONSTK_EVENT_TYPE_BROWSER_TERMINATIONSTK_EVENT_TYPE_DATA_AVAILABLESTK_EVENT_TYPE_CHANNEL_STATUSSTK_EVENT_TYPE_SINGLE_ACCESS_TECHNOLOGY_CHANGEDSTK_EVENT_TYPE_DISPLAY_PARAMETER_CHANGEDSTK_EVENT_TYPE_LOCAL_CONNECTIONSTK_EVENT_TYPE_NETWORK_SEARCH_MODE_CHANGEDSTK_EVENT_TYPE_BROWSING_STATUSSTK_EVENT_TYPE_FRAMES_INFORMATION_CHANGED
The service state of STK Location Status
STK_SERVICE_STATE_NORMALSTK_SERVICE_STATE_LIMITEDSTK_SERVICE_STATE_UNAVAILABLE
Tone type
STK_TONE_TYPE_DIAL_TONESTK_TONE_TYPE_CALLED_SUBSCRIBER_BUSYSTK_TONE_TYPE_CONGESTIONSTK_TONE_TYPE_RADIO_PATH_ACKSTK_TONE_TYPE_RADIO_PATH_NOT_AVAILABLESTK_TONE_TYPE_ERRORSTK_TONE_TYPE_CALL_WAITING_TONESTK_TONE_TYPE_RINGING_TONESTK_TONE_TYPE_GENERAL_BEEPSTK_TONE_TYPE_POSITIVE_ACK_TONESTK_TONE_TYPE_NEGATIVE_ACK_TONE
Time unit
STK_TIME_UNIT_MINUTESTK_TIME_UNIT_SECONDSTK_TIME_UNIT_TENTH_SECOND
Local Information list
STK_LOCAL_INFO_LOCATION_INFOSTK_LOCAL_INFO_IMEISTK_LOCAL_INFO_DATE_TIME_ZONESTK_LOCAL_INFO_LANGUAGE
Timer Management
STK_TIMER_STARTSTK_TIMER_DEACTIVATESTK_TIMER_GET_CURRENT_VALUE
Methods
MozIccManager.sendStkResponse()- Send the response back to ICC after an attempt to execute STK Proactive Command.
MozIccManager.sendStkMenuSelection()- Send the "Menu Selection" Envelope command to ICC for menu selection.
MozIccManager.sendStkTimerExpiration()- Send the "Timer Expiration" Envelope command to ICC for TIMER MANAGEMENT.
MozIccManager.sendStkEventDownload()- Send "Event Download" Envelope command to ICC.
MozIccManager.updateContact()- Update ICC Phonebook contact.
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()- Find out about the status of an ICC lock (e.g. the PIN lock).
MozIccManager.unlockCardLock()- Unlock a card lock.
MozIccManager.setCardLock()- Modify the state of a card lock.
The MozIccManager interface also inherits from the EventTarget interface.
EventTarget.addEventListener()- Register an event handler of a specific event type on the
EventTarget. EventTarget.removeEventListener()- Removes an event listener from the
EventTarget. EventTarget.dispatchEvent()- Dispatch an event to this
EventTarget.
Additional methods for Mozilla chrome code
Mozilla extensions for use by JS-implemented event targets to implement on* properties. See also WebIDL bindings.
- void setEventHandler(DOMString type, EventHandler handler)
- EventHandler getEventHandler(DOMString type)
Specification
Not part of any specification.