Intercepting home button on Android

空扰寡人 提交于 2019-12-20 04:13:10

问题


I've researched this a lot and it seems that after ICS normal applications can no longer intercept the Home Button.

However, I see apps like Go Locker that are able to trap the Home Button.

If Go Locker isn't intercepting the home button, what are they doing to prevent the user from going to the home screen?


回答1:


You cannot intercept the home button. You cannot disable it. The way how the go locker does it is by drawing its layout over other apps. It requires extra permission. See this link for more details here.



来源:https://stackoverflow.com/questions/23772386/intercepting-home-button-on-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!