Firefox OS/DSDS

From MozillaWiki
Jump to: navigation, search

Introduction of DSDS

DSDS, abbreviation of Dual-SIM-Dual-Standby, means user could have both SIM cards ready to receive incoming calls and incoming messages while the two cards are in 'standby' state, e.g. none of it is used in-call. In standby state, your friend can reach you with either SIM_1 or SIM2. However, if your friend tries to call your SIM_2 while you are in call on SIM_1, then your friend cannot reach you until the original call on SIM_1 is released. In DSDS, you can have data connections on one SIM card at a time. If you like to set up a data connection via that said SIM_1, then the connection on SIM_2 needs to be disconnected first if any.

Version 1.3

FFOS v1.3 is going to provide a basic set of DSDS user experience. UX_Spec_for_v1.3 is the latest UX specification for FFOS v1.3.

In general, in v1.3, user could choose one SIM card as a primary one for different purposes -- making an outgoing call, sending text messages and setting up data connections. That said, once user has chosen SIM_2 as the primary one for outgoing calls, a new call is always dialed out via SIM_2 unless user changes the setting.

Terminologies

  • Primary SIM
The one which the user chooses to make outgoing calls (for voice) and/or the one which the user chooses to make data calls (browsing).
  • Active SIM
The one on traffic channel (in call or data). For calls, It could be primary (outgoing, incoming) or non-primary (incoming). WRT data calls, Active SIM will be same as the primary SIM for data. (as there is no incoming/outgoing separation there).

Implementation and WebAPI Design

WebAPI
It is a starting point to know how many services are available on a device. navigator.mozMobileConnections.length provides the idea of the number of services. Each mozMobileConnection object is a service object. Index of the array of mozMobileConnections is seen as 'serviceId.'
Here we said the number of services instead of number of SIM cards because this API is aiming at not only gsm technologies but also others, such as CDMA. In this way, there could be no "SIM cards" but still available services (though in v1.3, the development work is focusing on gsm and wcdma). Another example is even in gsm, a modem without SIM card inserted is seen as an available service with limited functionality, such as emergency calls only.
Given that there could be a service while there's no SIM card, nsIDOMMozMobileConnection.iccId tells the situation. The null attribute indicates no SIM card/ICC there, otherwise it displays the ID.
Please refer to MozMobileConnectionAPI to have more details and use cases.
It is taking care of all the SIM/IC cards. navigator.mozIccManager.iccIds.length shows the number of ICCs on the device. This number isn't necessary equal to the number of services, i.e. navigator.mozMobileConnections.length.
With the iccId obtained from every service, i.e. nsIDOMMozMobileConnection.iccId, API user could acquire details about the ICC via IccManager API. For example,
var icc = navigator.mozIccManager.getIccById(iccId);
var mcc = icc.mcc;
var mnc = icc.mnc;
Please refer to MozIccManagerAPI to have more details and use cases.
Primary SIMs

In v1.3, user should choose the primary SIMs for different purposes. Various settings key are created in FFOS implementation.

  • Primary SIM for outgoing calls
When user changes his/her preference, values of below settings keys change accordinly:
  1. ril.voicemail.defaultServiceId
  2. ril.telephony.defaultServiceId
  • Primary SIM for outgoing text messages
When user changes his/her preference, values of below settings keys change accordinly:
  1. ril.sms.defaultServiceId
  • Primary SIM for data connections (Internet, MMS, AGPS)
When user changes his/her preference, values of below settings keys change accordinly:
  1. ril.mms.defaultServiceId
  2. ril.data.defaultServiceId

Note that we don't use 'iccId' as 'serviceId' in the whole API design and implementation. A valid value of each settings key should be a valid index of navigator.mozMobileConnections.

Please refer to SettingsAPI to know how to get the value of each settings key or observe changes.

Other APIs You Might Be Interested In

Version 1.4

FxOS v1.4 offers a more friendly user interface . Compared to the basic functionalities FxOS v1.3 provided, FxOS v1.4 introduces the concept of on-the-fly SIM indicator. With that, user can easily, flexibly and dynamically choose the SIM card for a service at the moment without a need to change the settings of "Primary SIM" in the Settings application.

In addition to the feature of on-the-fly SIM indicator, FxOS v1.4 changes the way to displaying information about incoming services so that user could tell via which SIM card a call is or an SMS is coming from with ease. FxOS v1.4 also reviews the user interface for settings, and makes enhancement so that user could configure one SIM card without interfereing in the other.

The latest UX DSDS guideline for FxOS v1.4 could be found here: UX_Spec_for_v1.4_DSDS.