阻止任何形式的中断 [英] Block any kind of interrupt

查看:42
本文介绍了阻止任何形式的中断的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我正在尝试开发一种应用程序,该应用程序将执行包括用户交互类型的原子"在内的功能.我不希望此功能被电话,短信或任何形式的提醒打断(只是不建议显示这些功能) 对用户而言,仍然可以接收并在以后向用户显示该SMS.

有没有办法为Windows Phone做这种事情?

Jake

解决方案

不,没有办法强迫用户停留在您的应用上.

您可以重新定义"后退按钮的行为,阻止用户向后导航(可能会关闭应用程序),但除此之外您将无法做更多的事情.

如果用户接到电话或按下Windows按钮,则您的应用将被删除,并调用相应的事件(已停用).

如果您的操作时间少于10秒,则应该没问题,因为10秒是停用的超时时间.

您可以得到的另一个问题是,如果用户锁定了电话,但是您可以覆盖该问题以使您的应用程序在锁定状态下运行(仍然必须设置为将其关闭才能通过认证).

希望能帮上忙.


Hi there,

I am trying to develop an application that shall perform a function that includes user interaction sort of "atomic". I do not want this funciton to be interrupted by calls, SMS or reminders of any kind (Just the display of those shall not be proposed to the user, the SMS may still be received and shown later to the user).

Is there a way to do such thing for Windows Phone?

Jake

解决方案

No, there isn't a way to force the user staying on your app.

You can "redefine" the back button behavior, preventing the user from navigating back (possible closing the app) but other than that you can't do much more. 

If the user receives a call or presses the windows button your app will be tombstoned and the respective event (deactivated) will be called. 

If your operation takes less than 10 seconds you should be fine since 10 seconds is the deactivated timeout.

Other problem that you can get is if the user locks the phone, but that you can override to let your app run under lock (still you must have a setting to turn it off so you can pass the certification).

Hope that it helped.


这篇关于阻止任何形式的中断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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