Windows Phone 7 emulator : Can I simulate a phone call

流过昼夜 提交于 2020-01-12 19:16:39

问题


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 ?


回答1:


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.




回答2:


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".



来源:https://stackoverflow.com/questions/3653654/windows-phone-7-emulator-can-i-simulate-a-phone-call

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!