[英]Show Message Box when application is in background
I need to show a Message box for user with two buttons(open application, cancel) when an application is in background. 当应用程序在后台时,我需要为用户显示一个带有两个按钮的消息框(打开应用程序,取消)。 How can I realise it (should it be a background task) ?
如何实现(应该是后台任务)?
You can't show custom message box from background. 您无法从后台显示自定义消息框。
As a workaround you can show Toast Notification
from Background Agent
. 作为解决方法,您可以显示
Background Agent
Toast Notification
。 Look at ShellToast
, it's made for this purpose. 看一下
ShellToast
,它就是为此目的而制作的。 When toast appears, users can tap it to open application as you need. 当烤面包出现时,用户可以根据需要点击它以打开应用程序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.