简体   繁体   English

锁屏上的Android活动弹出窗口

[英]Android activity popup on lockscreen

Ok, first time asking, I couldn't find a solution anywhere.. 好吧,第一次问,我在任何地方都找不到解决方案。

I'm trying to create an activity that pops up on the lockscreen, kinda like Handcent does (or even Viber, maybe? Can't remember), but I can't for the life of me find a solution that actually works, be it flags, system alert and such 我正在尝试创建一个在锁屏上弹出的活动,就像Handcent一样(或者甚至是Viber,也许?不记得了),但是我终生无法找到一个切实可行的解决方案,它标记,系统警报等

So far I only managed to achieve a workaround by having a dialog themed app and unlocking the phone before showing it but that's not what I'd like to have in the final product, plus it doesn't unlock all kinds of lockscreen (based on user feedbacks, I've had reports of Handcent successfully displaying a dialog while my app can't unlock it) 到目前为止,我只能通过以对话为主题的应用程序并在显示手机之前对其进行解锁来实现一种解决方法,但这并不是我最终产品所希望的,而且它不能解锁所有类型的锁屏(基于用户反馈,我收到了有关Handcent成功显示对话框的报告,但我的应用无法将其解锁)

Is there any tutorial or code snippet for this? 是否有任何教程或代码片段?

For Unlocking the Phone programatically this should help. 对于以编程方式解锁电话, 将有所帮助。 And as you are already using the Dialog Theme, your application's "pop-up" requirements are completed. 并且,由于您已经在使用“对话框主题”,因此您的应用程序的“弹出”要求也已完成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM