Windows Phone 7 - Events triggered on phone-call-connect and phone-call-disconnect

孤街醉人 提交于 2019-12-02 06:09:39

问题


I'm writing an application for Windows Mobile 7 which required information about "When a voice call was placed" and "when a voice call was hanged up or disconnected". Are there any API's or events/triggers that can give me this information.


回答1:


The current SDK doesn't offer this capability - generally, you cannot keep track of user activity (like calls) outside the application due to a sandboxed environment that by default doesn't offer any system process hooks.




回答2:


While you can't get any information about a specific phone call, if your application is running you can be informed when a call is received (and ended) by using the Obscured and Unobsured events on the page.

Please note that this will be triggered when ANY piece of UI chrome covers the page. In addition to incoming call notifications, this will also include incoming SMS notifications, alarms, etc.

These event are an important part of the application lifecycle for some types of apps (typically games) but are often overlooked.



来源:https://stackoverflow.com/questions/5059656/windows-phone-7-events-triggered-on-phone-call-connect-and-phone-call-disconne

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