Android - How to catch that the Home button was pressed?

前端 未结 6 1611
无人共我
无人共我 2020-12-12 00:30

I am trying to catch when the user has pressed the Home button. I thought I could use

protected void onResume()
{
   registerReceiver(homeReceiver, new Inte         


        
6条回答
  •  我在风中等你
    2020-12-12 00:50

    The home button can not be overriden. You can only catch the intent and display a diferent home, but the user will always be able to choose.

    Dont mess with how hard buttons work so much, user like consistent behaviour.

提交回复
热议问题