I am looking into developing for Windows Phone 7. For testing my app, I need to be able to simulate a phone call. Is it possible in the emulator ?
I don't believe you can emulate the phone call itself, but you can emulate launching the dialler with a number and an optional name.
For unit testing purposes, you'll probably want to create an interface with the appropriate functionality, and then a wrapper around the system PhoneCallTask
type.
As the PhoneCallTask
doesn't actually make the call directly - it just opens up the UI allowing the user to connect conveniently - you can test that functionality in the emulator nice and easily. Mind you, if you do then hit "call" you get to see the phone UI, and see the "phone call in progress" icon at the top. The network reports itself as "Fake GSM Network".
No. it's not possible to simualte your application being interupted by a phone call being received. It's also been announced that as the RTM emulator will only support MinUI there will not be a way to test this in the emulator for the foreseeable future. You will need to test this on a real device.
Unfortunately there is no way round testing this on a real device as other forms of interuption, such as returning to the start screen or performing a search (both courtesy of the hardware buttons onthe front of the device), have a different impact on the running application.