My app is written entirely in C/C++ using NativeActivity
, it has no Java code (based on "native-activity" NDK example). Pressing "back" button closes it (destroys activity), but I need other behaivor of this button because I have my own UI and menus which are displayed via OpenGL.
As I read, In order to change behaivor of "back" button, I need to override onBackPressed()
method of Java activity class. But I don't use Java, can I reach this method from C/C++ to override it?
If no, is there another way to handle with "back" button using NDK, without java code?
struct android_app
etc. – Backing