Some people are using NativeActivity for working with Android projects exclusively in C++, but this also carries some disadvantages, so I, like many others, decided that I’d use instead a Java glue code; just a single Java file wrapping all things I need from C++, where pretty much everything runs.
With this said, as far as I know, using this Java code forces me to implement the native function calls in Java, where the Java calls a function that is actually called within the C++ part of the project, with the JNI.
In C++, the native function being called has a prototype like this:
JNIEXPORT void Java_com_package_name_nativeTouchDown( JNIEnv* env, jobject thiz, jfloat x, jfloat y );
My problem is that I started working with scripts exclusively and would like to find a way to not having to recompile the C++ code anymore. So when I want to make a new project, I just copy-paste my C++ compiled code and change the scripts and be allowed to change the package name of the app without any recompilation.
Is this possible somehow? At the point I am at, I simply have to recompile my C++ to conform to a new package name (the one in the format
com.company.game). Can’t I make C++ fully abstracted from this package name or change it dynamically?