WebAPI/WebTelephony/Multi-SIM: Difference between revisions

no edit summary
(B2G arch proposal for multi-sim)
No edit summary
Line 66: Line 66:
   };
   };


=== Use Case ===
<h3> Use Case </h3>
==== Outgoing Call ====
<h4> Outgoing Call </h4>
*Current B2G
<ul><li>Current B2G
  navigator.mozTelephony.dial(number)
</li></ul>
*Multi-SIM
<pre class="_fck_mw_lspace"> navigator.mozTelephony.dial(number)
  navigator.mozTelephonyManager.defaultPhone.dial()
</pre>
  navigator.mozTelephonyManager.phones[index].dial()
<ul><li>Multi-SIM
 
</li></ul>
==== Incoming Call ====
<pre class="_fck_mw_lspace"> navigator.mozTelephonyManager.defaultPhone.dial()
*Current B2G
navigator.mozTelephonyManager.phones[index].dial()
  Tel1 = navigator.mozTelephony;
</pre>
*Multi-SIM
<h4> Incoming Call </h4>
  Tel1 = navigator.mozTelephonyManager.phones[index];
<ul><li>Current B2G
 
</li></ul>
Once the telephony object is obtained, the following work remains the same.  
<pre class="_fck_mw_lspace"> Tel1 = navigator.mozTelephony;
</pre>
Tel1.addEventListener('incoming');
<ul><li>Multi-SIM
Tel1.onincoming = function onincoming (evt) {
</li></ul>
  incoming = evt.call; };
<pre class="_fck_mw_lspace"> Tel1 = navigator.mozTelephonyManager.phones[index];
incoming.answer();
</pre>
 
<p>Once the telephony object is obtained, the following work remains the same.  
</p>
<pre class="_fck_mw_lspace">Tel1.addEventListener('incoming');
Tel1.onincoming = function onincoming (evt) {
incoming = evt.call; };
incoming.answer();
</pre>
<h2> Proposal: Architecture  </h2>
<h2> Proposal: Architecture  </h2>
<p><img src="/images/thumb/6/6e/B2GArch.png/799px-B2GArch.png" _fck_mw_filename="B2GArch.png" _fck_mw_width="799" _fck_mw_height="600" alt="B2G: Single SIM" />
<p><img src="/images/thumb/6/6e/B2GArch.png/400px-B2GArch.png" _fck_mw_filename="B2GArch.png" _fck_mw_width="400" alt="B2GArch.png" />
</p><p><img src="/images/thumb/d/d9/B2GArch-multisim.png/799px-B2GArch-multisim.png" _fck_mw_filename="B2GArch-multisim.png" _fck_mw_width="799" _fck_mw_height="600" alt="B2GArch-multisim.png" />
</p>
</p>
Confirmed users
978

edits