Changes

Jump to: navigation, search

WebAPI/WebMobileConnection/Multi-SIM

296 bytes removed, 10:35, 14 May 2013
Proposal: WebMobileConnectionManager API for Multi-SIM
== Proposal: WebMobileConnectionManager API for Multi-SIM ==
Currently B2G supports a single SIM architecture. This proposal wants to extend it for supporting multi-SIMs. In multi-SIM device, each service is independent and has it own status and information. Here, we introduce a central 'nsIDOMMozMobileConnectionManager' to manage several multiple nsIDOMMozMobileConnection objectsarchitecture. One nsIDOMMozMobileConnection object is binded to a physical SIM slotservicensIDOMMozMobileConnectionManager will handle the interactive and synchronizing functions between nsIDOMMozMobileConnection objects in the future. For example, when data connection via SIM1 is no longer available, nsIDOMMobileConnectionManager will establish data connection via SIM2 for upper layersYou can use serviceId as index to get corresponding service object.
=== Web API ===
Following are what we create for nsIDOMMozMobileConnectionManagerThe change is quite simple, navigator interface nsIDOMMozMobileConnectionManager : nsISupports { readonly attribute jsval mobileConnections; readonly attribute mozMobileConnection becomes an array of nsIDOMMozMobileConnection defaultMobileConnection; };obect. API users can use 'serviceId' as an index to access corresponding service object.
We don't modify the existed interface, like nsIDOMMozMobileConnection, nsIDOMMozMobileConnectionInfo ...etc, to minimize the coding effort of gaia.
*Multi-SIMs
// Listen connection status of default SIM slot var conn = window.navigator.mozMobileConnectionManager.defaultMobileConnection;  // Listen connection status of for specific SIM slotservice var conn = window.navigator.mozMobileConnectionManager.MobileConnectionsmozMobileConnection[indexserviceId];
Once the mobile connection object is obtained, the follow work is the same. We can get notification when voice/data connection change occurs in specific SIM.
}
}
 
And also you can get total number of service via
var numberOfServices = window.navigator.mozMobileConnection.length;
==== Get ICC Lock Status ====
Confirm
258
edits

Navigation menu