Confirmed users
978
edits
m (→Web API) |
m (→Incoming Call) |
||
| Line 94: | Line 94: | ||
Tel1 = navigator.mozTelephonyManager.phones[index]; | Tel1 = navigator.mozTelephonyManager.phones[index]; | ||
Once the telephony object is obtained, the following work remains the same. | Once the telephony object is obtained, the following work remains the same. We can get notified when an incoming call occurs in the specified SIM. | ||
Tel1.addEventListener('incoming'); | Tel1.addEventListener('incoming'); | ||
| Line 100: | Line 100: | ||
incoming = evt.call; }; | incoming = evt.call; }; | ||
incoming.answer(); | incoming.answer(); | ||
We can also listen to the 'incoming' event for a newly incoming call, no matter which SIM the call comes from. | |||
navigator.mozTelephonyManager.addEventListener('incoming'); | |||
=== Implementation Details === | === Implementation Details === | ||