通过主屏幕替换技术​​了解自锁的实现在Android [英] Understanding custom lock implementation on Android via home screen replacement technique

查看:129
本文介绍了通过主屏幕替换技术​​了解自锁的实现在Android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在研究这个问题很多。我问相关问题,这week.The在该地区最有帮助和相关链接和<一href="http://stackoverflow.com/questions/8248213/use-my-own-android-app-apk-as-launcher-home-screen-replacement">this.我想了解它是如何工作和所有的,如果实施的主屏幕更换应用程序。

快捷提问:

  • 如果实施该屏应设置为默认?我们的主屏幕更换或原有的主屏幕?
  • 请阅读这个问题在那里提问者想出了一个办法做到这一点。最后,他说:

    想通了!总得禁用清单意图过滤器使用setComponentEnabledSetting(),然后将其重新活动时弹出。感谢您的帮助!

这到底是什么意思?我不太明白这里的逻辑。请帮忙?

  • 基本上,我有同样的疑惑,因为这提问者(请参阅评论低于@CoffeeCrisp 的答案)。但是,我无法理解的解决方案,究竟发生在这里。请帮忙?

感谢。

编辑:请不要downvote它。如果有一个从我的最终要求的提高,请在评论暗示,让我有时间做出改变。非常感谢。

解决方案
  1. 如果你实现了一个主屏幕更换应用程序,你的应用程序应该被设置为默认启动/主屏幕。

  2. setComponentEnabledSetting()可以覆盖的意图过滤器在清单中,基本上禁用它们。这听起来像他推翻了过滤器,为用户解除锁定后发射的意图,所以他可以得到默认主屏幕显示出来。

话虽这么说,我不建议写一个锁屏更换,有太多的问题,这是哈克和不安全。专注于锁屏小部件。

I've been researching about this question a lot. I asked a related question this week.The most helpful and relevant links in the area are this and this. I want to understand how it works and all, if implemented as home screen replacement app.

Quick questions:

  • If implemented which screen should be set as default? Our home screen replacement or original home screen?
  • Please read the comments after the answer of this question where asker figured out a way to do it. In the end he says:

    "Figured it out! Gotta disable the manifest intent filter by using setComponentEnabledSetting(), and then turn it back on when the activity pops up. Thanks for your help!"

What exactly does this mean? I don't quite understand the logic here. Please help?

  • Basically, I have same doubts as this asker (please see the comments below the answer by @CoffeeCrisp). But, I am unable to understand the solution and what exactly happened in here. Please help?

Thanks.

Edit: Please don't downvote it. If there's an improvement required from my end, please suggest in the comment so that I get time to make changes. Thanks so much.

解决方案

  1. If you implemented a home screen replacement app, your app should be set as the default launcher/home screen.

  2. setComponentEnabledSetting() allows you to override the intent filters in the manifest and essentially disable them. It sounds like he overrode the filter for the launcher intent after the user unlocked so he could get the default home screen to show up.

That being said, I don't recommend writing a lock screen replacement, there are too many issues, it's hacky and insecure. Focus on lock screen widgets.

这篇关于通过主屏幕替换技术​​了解自锁的实现在Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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