I implemented the PhoneListener interface. Initially, it works fine. When simulating any phone call, the method callConnected is entered, and I can retrieve a handle to the phone call information as in the code below:
PHP Code:
public void callConnected(int callId) {
PhoneCall phoneCall = Phone.getCall( callId);
....
}
When simulating the end of a phone call, the method callDisconnected is entered. However, no matter how simple I make the example, the retrieved handle (as in the code below) to the desired PhoneCall object is always null.
PHP Code:
public void callDisconnected(int callId) {
PhoneCall phoneCall = Phone.getCall( callId);
....
}
Am i trying to get this data in the wrong way? Should I keep track of the callId's and the corresponding PhoneCall objects myself?
I hope someone can point me in the right direction...