我们可以在 Android 上将 Vuforia 与 NativeActivity 一起使用吗 [英] Can we use Vuforia with NativeActivity on Android
问题描述
Vuforia 官网的所有示例均使用纯 Java 或 Java 与 C++ 结合使用.但是,我的应用程序仅使用 NativeActivity,换句话说,它不包含 Java 代码.问题是我可以在只有 C++ 代码的应用程序中使用 Vuforia 吗?
All the samples from Vuforia official website use pure Java or Java together with c++. But, my application uses only NativeActivity, in other word, it contains no java code. The question is can I use Vuforia in an application which has only c++ code?
推荐答案
NativeActivity 只是框架提供的 Java 文件:https://android.googlesource.com/platform/frameworks/base.git/+/master/core/java/android/app/NativeActivity.java
NativeActivity is just a Java file provided by the framework: https://android.googlesource.com/platform/frameworks/base.git/+/master/core/java/android/app/NativeActivity.java
任何 Android 应用都需要处理 Android Activity Lifecycle,在您的情况下,它需要包装您可能拥有的任何 C/C++ 代码.
Any Android app will need to handle the Android Activity Lifecycle and in your case it will need to wrap any C/C++ code you may have.
这篇关于我们可以在 Android 上将 Vuforia 与 NativeActivity 一起使用吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!