0

I want to handle the homekeypress event in my Android app and have tried with some codes but failed. Some are saying that there is no such method or Android gives no-longer support of that sort of events even if they were exist. Is there any way to handle that event?

Baqer Naqvi
  • 6,011
  • 3
  • 50
  • 68
  • 1
    There is no way to intercept that key event, but you can use you activity's `onPause` method to detect when the activity is hidden. – Dan Harms Apr 15 '14 at 13:28
  • check this out : [Detect home button press][1] [1]: http://stackoverflow.com/questions/8881951/detect-home-button-press-in-android – Dhwanik Gandhi Apr 15 '14 at 13:32
  • 1
    no you can't. but you can look at `onUserLeaveHint` which may help you. http://developer.android.com/reference/android/app/Activity.html#onUserLeaveHint() – Raghunandan Apr 15 '14 at 13:34

0 Answers0