I have an Android NDK native project, and I would like to use the same constants in both the C++ and Java code.
From this question I understand that I can declare Android resources in Gradle files as
android {
buildTypes {
debug{ resValue "string", "app_name", "My App Name Debug" }
release { resValue "string", "app_name", "My App Name" }
}
}
which I can then access in my Java code with @string/app_name or R.string.app_name
Is there a mechanism for accessing these declarations in my native C++ code, which is compiled as part of my Gradle build process?