WebAPI/WebMobileConnection/Multi-SIM: Difference between revisions

Jump to navigation Jump to search
Line 82: Line 82:
And also you can get total number of service via
And also you can get total number of service via
       var numberOfServices = window.navigator.mozMobileConnections.length;
       var numberOfServices = window.navigator.mozMobileConnections.length;
==== Get ICC Lock Status  ====
*Current B2G (Single SIM)
        var mobileConnection=window.navigator.mozMobileConnection;
        var req = mobileConnection.getCardLock('pin');
*Multi-SIMs
      // Get ICC lock status of default SIM slot.
      var mobileConnection= window.navigator.mozMobileConnectionManager.defaultMobileConnection;
      var req = mobileConnection.getCardLock('pin');
      // Get ICC lock status of specific SIM slot.
      var mobileConnection= window.navigator.mozMobileConnectionManager.mobileConnections[index];
      var req = mobileConnection.getCardLock('pin');
==== SIM Toolkit  ====
      // Access STK of default SIM slot
      var icc = window.navigator.mozMobileConnectionManager.defaultMobileConnection.icc;
      // Access STK of specific SIM slot
      var icc = window.navigator.mozMobileConnectionManager.MobileConnections[index].icc;


=== Implementation ===
=== Implementation ===
Confirmed users
258

edits

Navigation menu