how to check On-Screen or Physical/Capacitive Navigation Buttons on device
Asked
Active
Viewed 304 times
1 Answers
1
you can use ViewConfiguration.get(context).hasPermanentMenuKey()
only available for API level 14+
the best answer that helped will be this
boolean hasMenuKey = ViewConfiguration.get(context).hasPermanentMenuKey();
boolean hasBackKey = KeyCharacterMap.deviceHasKey(KeyEvent.KEYCODE_BACK);
if(!hasMenuKey && !hasBackKey) {
}
-
HI @saur as above solution is working fine in Nexus , samsung devices but not working in Moto x play as welll Micro max device so is there any general solution ? – Arpan24x7 Feb 11 '16 at 09:49
-
@Arpan24x7 i have tested the code in moto e(1st gen)(L) and moto g(3rd gen)(M) for softkeyboard and redmi 1s(J) , redmi prime(K) as well as micromax a106(L) for hard keyboard and is working fine for me......is it specific to moto x play? which micromax device is it? – saur Feb 11 '16 at 11:09
-
Here i found bug in two device which i have, 1) Moto X play 2) Micromax Canvas Express 2 – Arpan24x7 Feb 11 '16 at 12:14