I am using an active object to listen for an incoming call. I can detect this fine. However I would like then for my app ( not a game ) to be paued, or at least make it lose focus. I need to do this otherwise if the user needs to press buttons during the call i.e for voice mail etc.. the keys pressed are entered into my app and not into the phone.
would it be possible for you to help me in designing and Active object that is notified when there is an incoming call ? I am familiar with the active object but I don't know how to send an "incoming call notification" request.
Thank you by advance
I assume you know how to open a server,phone and line connenction. If not there are many examples on this site and the SDK or I can post it here if you want. Anyway here is the code that lets you listen for an incoming call.
//This function is called right after ConstructL.
// If A.Object is already active, panic.
__ASSERT_ALWAYS( !IsActive(), User::Panic( _L( "CAssistPhoneMonitor" ), 1) );
// Wait for incoming call.
iLine.NotifyIncomingCall( iStatus, iIncomingCallName );
// Set the A.Object active.
//When a call is detected, this is automatically run by the program.
// Opens an existing call.
iCall.OpenExistingCall( iLine, iIncomingCallName );
thank you for your fast answer. I am now able to detect the incoming phone call in the application except in one case and may you could help me again.
Indeed the application I am desiging is sending some data (using RSocket) with a 3650: the problem I have is that during the very sending of data (the phone is connected to GPRS) the device does not answer to any incoming call: instead the call is sent to the operator voice mail. I don't know if it's possible to avoid this. May be it is an inherent behavior of the phone. Have you any idea ?
Thanks a lot by advance
I don't think its possible to avoid this as when the phone is sending dating the device is 'busy' and therefore can't recieve a phone call. Its a bit like if you are making a call and someone else tries to contact you they won't be able to. I'm not 100% sure but I think thats how it goes for GPRS.
thanks a lot. I think you're right. I performed some tests with the Nokia Wap Service application on the 3650 and indeed when the device is in the process of sending/receiving bytes it appears busy to incoming calls. Though if you are connected to the GPRS network without sending data (just connected) then the incoming calls are detected and the GPRS connection is suspended. That's how I think it works. I'll continue investigating that more thorougly.
Thanks for your help.