0

We have two different kind of devices one is having soft back button, another one having hardware back button. Is there any common method for find out hardware back button is exists or not.

I tried the below code to detect hardware back button presence but that is not reliable. It is returning true for one tablet which don't have hardware back button and has soft back button.

boolean hasBackKey = KeyCharacterMap.deviceHasKey(KeyEvent.KEYCODE_BACK);

Please suggest me is there any way.

Raghu Mudem
  • 6,793
  • 13
  • 48
  • 69

0 Answers0