Skip to content Skip to sidebar Skip to footer

How To Get A Call State Of A Phone

Possible Duplicate: Trouble with reading phone state I want to get a call state of phone in my application. I am doing one application in which , When user dial to a number, the

Solution 1:

You cannot obtain call related info like user busy, phone switch off etc directly by accessing internal API. Android does not provide these details for security reasons. All you can do is trace the Log. we have three kinds of logs, so you have to trace "Radio Log" only.

It consist of solcited and unsolicited commands, which are nothing but instructions sent from phone modem to Android OS and vice versa.

There you will find the line: onDisconnect Cause: XXXX which will be answer to your question.

Solution 2:

you really should take a look at the code in PhoneApp.java. tracing this line, you will find out that 'cm = CallManager.getInstance()' is useless . the key to this problem is GsmCall.java and GsmCallTracker

Post a Comment for "How To Get A Call State Of A Phone"