Detect home button press in android

后端 未结 17 2197
抹茶落季
抹茶落季 2020-11-22 08:22

This has been driving me nuts for a while now.

Is there any way of reliably detecting if the home button has been pressed in an android application?

Failing

17条回答
  •  长发绾君心
    2020-11-22 09:04

    An option for your application would be to write a replacement Home Screen using the android.intent.category.HOME Intent. I believe this type of Intent you can see the home button.

    More details:

    http://developer.android.com/guide/topics/intents/intents-filters.html#imatch

提交回复
热议问题