安卓:打开屏幕上,并通知用户 [英] Android: Turn screen ON and notify user

查看:89
本文介绍了安卓:打开屏幕上,并通知用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些意向。当意图火灾,我想送一个弹出通知像AlertBox并打开屏幕上,让用户立即看到通知(我的意思是没有表现出锁屏)。

I have some Intent. When intent fires, I want to send a popup notification like an AlertBox and turn screen ON to let User see the notification immediately (I mean without showing a lockscreen).

如果你已经使用,例如,HandcentSMS那么你明白我的意思(如弹出式通知,当接受一个消息)

If you've used, for example, HandcentSMS then you understand what I mean (like a popup notification when accept a message)

如何组织的?任何code的例子吗?我有什么样的权限使用?

How to organize this? Any code examples? What kind of permissions I have to use?

感谢你在前进。

推荐答案

也许的 KeyguardLock 会做你想要的:弹出您的通知,然后调用 disableKeyguard ,然后重新启用,当用户完成后,或超时。

Perhaps KeyguardLock will do what you want: popup your notification and then call disableKeyguard, then re-enable when the user is done or after you time out.

安全 - 明智的它是一个有点冒险,但你去那里。

Security-wise it is a little risky, but there you go.

这篇关于安卓:打开屏幕上,并通知用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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