| ID | Creation date | May 3, 2009 | |
| Platform | S60 2nd Edition, S60 3rd Edition, S60 5th Edition | Tested on devices | Nokia N95, Nokia E90 |
| Category | M | Subcategory | Telephony |
| Keywords (APIs, classes, methods, functions): phone |
This article shows how to handle calls in m.
On S60 3rd Edition an incoming call cannot be hung up without being answered first.
use phone
//Dial the number
phone.dial("1234567890")
//Wait until the phone is in idle state, meaning the call has been hung up
phone.state(phone.idle)
//Show the duration of the call in milliseconds
print "Duration: " + phone.ms()
use phone
//Wait for an incoming call
call = phone.new()
if call["incoming"] = true then
//Check the caller's number
if call["number"] = "1234567890" then
//Answer the call
phone.answer();
//Wait 10 seconds
sleep(10000);
end;
//Hang up the call
phone.hangup()
end
The operations described are performed.
No related wiki articles found