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 ?
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.
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".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With