Confirmed users
258
edits
No edit summary |
|||
| Line 1: | Line 1: | ||
== 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. Here | 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 multiple nsIDOMMozMobileConnection objects architecture. One nsIDOMMozMobileConnection object is binded to a service. You can use serviceId as index to get corresponding service object. | ||
=== Web API === | === Web API === | ||
The change is quite simple, navigator.mozMobileConnection becomes an array of nsIDOMMozMobileConnection 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. | We don't modify the existed interface, like nsIDOMMozMobileConnection, nsIDOMMozMobileConnectionInfo ...etc, to minimize the coding effort of gaia. | ||
| Line 77: | Line 69: | ||
*Multi-SIMs | *Multi-SIMs | ||
// Listen connection status | // Listen connection status for specific service | ||
var conn = window.navigator.mozMobileConnection[serviceId]; | |||
var conn = window.navigator. | |||
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. | 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. | ||
| Line 96: | Line 85: | ||
} | } | ||
} | } | ||
And also you can get total number of service via | |||
var numberOfServices = window.navigator.mozMobileConnection.length; | |||
==== Get ICC Lock Status ==== | ==== Get ICC Lock Status ==== | ||