Windows Phone 7 - 如何计算通话时长或终止 [英] Windows Phone 7 - How to calculate call duration or termination

查看:27
本文介绍了Windows Phone 7 - 如何计算通话时长或终止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Windows Phone 7 开发的新手...

I'm new to windows phone 7 development...

谁能告诉我如何计算通话时长?或者如何获得来电通知?使用 Silverlight 或 C#

Can anyone please tell me how to calculate call duration? or how to get notification of incoming call? using silverlight or c#

是否有任何可用的 API..

is there any API's available..

谢谢山姆

推荐答案

无法访问呼叫信息.

但是,如果您的应用正在运行并且在 Obscured 事件将被触发.然后,您可以使用 UnobscuredNavigatedToLoadedActivated 事件以确定应用何时再次获得焦点.

However if your app is running and a call comes in the Obscured event will be triggered. You can then use a combination of the Unobscured, NavigatedTo, Loaded & Activated events to determine when the app has the focus again.

这不会为您提供通话时长,而是提供可能是通话的事件(包括收到的短信、闹钟等)与用户完全返回您的应用之间的时间.这可能是一个足够好的近似值,但这取决于您的需求.

This won't give you the length of the call but rather then time between an event that may be a call (including incoming SMS, alarms, etc.) and the user returning fully to your app. This may be a good enough approximation, but it will depend on your needs.

这篇关于Windows Phone 7 - 如何计算通话时长或终止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆