Determining if phone has softkeys on Android

Hi,
I am fairly new with Haxe and Openfl. I’m creating an application with Android target. I want to determine whether the phone has hardware or softkeys. Based on this information I want to hide or show a back button in my apps navigation.

There exists a Java API but I have not yet worked with Haxe externs or embedding Java code and such: http://stackoverflow.com/questions/16092431/check-for-navigation-bar/16608481#16608481

How can I invoke this Java code from within an openfl app?

boolean hasMenuKey = ViewConfiguration.get(context).hasPermanentMenuKey();
boolean hasBackKey = KeyCharacterMap.deviceHasKey(KeyEvent.KEYCODE_BACK);

Any help is appreciated! Thanks!

  • gorwell

This sounds like a job for extensions!

I’ll check this out. Thanks!