本文介绍了Android的创建漂浮在锁屏的活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要创建一个漂浮在锁屏界面,并用它做什么活动,我认为这是在每一个应用程序会出现一个比另一个订单,但我不知道怎么办。所以我想同时拥有键盘锁(将始终启用)和活动展示,所以如果该活动将有一个半透明的主题(不可见的背景),键盘锁将是可见的落后。

I want to create an activity that float over the lock screen and do something with it, I think there is an order in which every app will appear one over another, but I don't know how. So i want to have both KeyGuard(will be always enable) and activity showing, so if the activity will have an transluscent theme(invisible background), the keyguard will be visible behind.

有一种方法来创建一个漂浮在锁屏的活动?谢谢你。

There is a way to create an activity that float over the lock screen? Thanks.

我试过这样:

和类似的解决方案,但没有运气。

I tried this:Android activity over default lock screen,and similar solutions but with no luck.

推荐答案

这是不可能的。

如果第三方开发者可以把任何活动上的锁屏的上方,这将是锁屏后,所有的目的是什么?

If 3rd party developers could put any activity on top of lock screen, what would be the purpose of lock screen after all?

在另一边,开发者可以欺骗用户以为目前的锁屏是真实的,而事实并非如此。甚至可以嗅出用户名和密码(与F.E.图案锁屏,当你试过超过30倍,你需要输入密码才能解锁)。

On the other side, developers could trick users into thinking that current lock screen is authentic while they are not. And even could sniff user name and password (f.e. with pattern lock screen, when you've tried more then 30 times you need to enter the password to unlock).

最开发人员可以在未来的版本预计是添加自定义视图到锁屏(在通知栏类似)的能力。但是,这只是我的猜测。

The most developers can expect in future versions is the ability to add custom views into lock screen (something like in notification bar). But that is just my speculations.

这篇关于Android的创建漂浮在锁屏的活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-17 19:38