This page concerns the Vuforia Engine API version 9.8 and earlier. It has been deprecated and will no longer be actively updated.
Vuforia Engine can leverage Google's ARCore on devices that support it. Take advantage of ARCore for Ground Plane and Device Tracking (including Extended Tracking) features.
You can enable Vuforia Engine to use ARCore instead of using Vuforia’s own plane-finding technology. Using ARCore on devices where it is supported is encouraged. Consider also if your AR app should have ARCore as a requirement or optional depending on the set of devices that you wish to target.
Unity
In Unity, you can easily include the ARCore Library with the checkbox in the Vuforia Configuration in the Device Tracker component. The Gradle build will then automatically include the version of the ARCore library as specified on the Vuforia Supported Versions page. To use a custom version of ARCore, keep the ARCore Requirement unchecked.
NOTE: If the positional device tracker is enabled in the configuration, the ARCore setting is automatically set to OPTIONAL, but can be changed after that.
ARCore fails to start
In some situations, ARCore may fail to start when the App is built with the target API set to Android 30. To ensure that ARCore starts please use one of the following two suggestions:
- Set the Android target to API to 29 instead
Or
- Change the ARCore version in the project:
- In the Vuforia Configuration, uncheck the Include ARCore library option.
- In the Project. create the directory: Assets/Plugins/Android.
- Copy the arcore_client.aar file with version 1.19.0 or 1.22.0 to that directory.
NOTE: That the maximum version supported by Vuforia Engine 9.8 is 1.22.0.
The aar file can be downloaded from google-ar/arcore-unity-sdk.
Native Android
Prerequisites
For the latest supported Android Studio, SDK Build Tools, Gradle, and NDK, please refer to Supported Versions. For more information on enabling ARCore, please refer to the Android Developer Portal.
Enabling ARCore
- Open
AndroidManifest.xml
and add the following within the<application>
element:
<!-- The following must be present to facilitate use of ARCore, if available -->
<meta-data android:name="com.google.ar.core" android:value="optional" />
- Edit
(root) build.gradle
and ensure that each of therepositories
elements includes an entry forgoogle()
:
repositories {
jcenter()
google()
}
- Also in
(root) build.gradle
, ensure that thedependencies
element references the latest supported Gradle tools:
classpath 'com.android.tools.build:gradle:4.1.0
- Edit
app/build.gradle
and confirm that thedependencies
element references the ARCore client library:
dependencies {
implementation 'com.google.ar:core:1.18.0'
}