Instead of "Core Features" sample , download the "Advanced Topic" from Vuforia sample using Link: https://developer.vuforia.com/downloads/samples
- Advanced Topic are samples that demonstrate how to work with C++ on
Android. The Vuforia Android samples are set up so that application
lifecycle events are handled in Java, but tracking events and
rendering are handled natively in C++.
- Users can leverage Android SDK functionality, such as touch handling
or networking logic, while doing the low-level graphics work
natively. This functionality requires a way to communicate between
Java and C++. This communication is provided by the JNI.
- You can find C++ files at: Src>>Main>>JNI folder in Studio project
IMP: You have to also set path for "NDK" in android studio to compile C++ code. please search it on google "how to set NDK in android studio"
I think following Link will be helpful for you:
https://library.vuforia.com/articles/Solution/How-To-Communicate-Between-Java-and-C-using-the-JNI