I've seen articles and articles on hiding the navigation bar for android application through java. However, what I would like to know, is how do I remove the navigation bar through a pure android c++ native-activity application for a full-screen application(game)(NO JAVA AT ALL!). Full-screen from the android manifest works at hiding the top bar, but the navigation bar stays visible.
This is the Navigation Bar that I wish to remove.
I've searched through books with no luck, there's is no actual documentation for native-activity and google searches result in nothing. There is only the comments inside some of the header files which are tiny comments that don't even help. It seems the topic regarding pure c++ android applications is a black spot yet a lot of games that are coming out on the market are written in c++.
I've also tried setting:
AConfiguration_setNavHidden(m_app->config, ACONFIGURATION_NAVHIDDEN_YES);
But it seems to do nothing, in fact all the AConfiguratin_setXXX seem to do nothing. Perhaps I'm calling it in the wrong place? I've been calling it during APP_CMD_INIT_WINDOW after creating the window. Where should I be calling this function?
GetMethodID
and related functions. AConfiguration is probably not what you need — based on quick glance over docs, it is for editing JavaConfiguration
object. You need to getjobject
for yourActivity
, obtainJNIEnv
and use it to call Java methods required for your task. – Salinas