Enable AR to use augmented reality features in your new or existing app.

## Configure your app to be AR Required or AR Optional

To save space on individual devices, all AR features are stored in an app called [Google Play Services for AR](https://play.google.com/store/apps/details?id=com.google.ar.core) that is updated separately by the Play Store. Android apps that use AR features communicate with Google Play Services for AR using the ARCore SDK. An app that supports AR features can be configured in two ways: **AR Required** and **AR Optional**. This designation determines how the app interacts with the Google Play Services for AR app.

An **AR Required** app cannot function without ARCore. It requires an [ARCore supported device](https://developers.google.com/ar/devices) that has installed Google Play Services for AR.

- The Google Play Store will only make AR Required apps available on devices that support ARCore.
- When users install an AR Required app, the Google Play Store will automatically install Google Play Services for AR on their device. However, your app must still [perform additional runtime checks](https://developers.google.com/ar/develop/unity-arf/enable-arcore#perform_runtime_checks) in case Google Play Services for AR is out of date or has been manually uninstalled.

An **AR Optional** app uses ARCore to enhance existing functionality. It has optional AR features which are only activated on ARCore supported devices that have installed Google Play Services for AR.

- AR Optional apps can be installed and run on devices that don't support ARCore.
- When users install an AR Optional app, the Google Play Store will **not** automatically install Google Play Services for AR on the device.

|   | AR Required | AR Optional |
|---|---|---|
| AR Feature usage | Your app needs ARCore for basic functionality. | ARCore augments your app's functionality. Your app can run without ARCore support. |
| Play Store visibility | Your app is only listed in the Play Store on [devices that support ARCore.](https://developers.google.com/ar/discover/supported-devices) | Your app follows [normal listing procedures](https://developer.android.com/guide/topics/manifest/uses-feature-element#market-feature-filtering). |
| Google Play Services for AR installation method | The Play Store installs Google Play Services for AR alongside your app. | Your app uses the [`ARSession.Install()` coroutine](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/api/UnityEngine.XR.ARFoundation.ARSession.html#UnityEngine_XR_ARFoundation_ARSession_Install) to download and install ARCore. |
| Android `minSdkVersion` requirements | Android 7.0 (API Level 24) | Android 4.4 (API Level 19), though *running* any AR functionality requires at least Android 7.0 (API Level 24) |
| Must use [`ARSession.state`](https://developers.google.comhttps://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/manual/index.html#session-state) to check ARCore support and install status |   |   |
| Must use the [`ARSession.Install()` coroutine](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/api/UnityEngine.XR.ARFoundation.ARSession.html#UnityEngine_XR_ARFoundation_ARSession_Install) to install Google Play Services for AR |   |   |

### Make your app AR Required

### Android

1. Navigate to **Edit \> Project Settings \> XR Plug-in Management \>
   ARCore** . **Requirement** is set to **Required** by default.

   ![](https://developers.google.com/static/ar/develop/unity-arf/images/enable-arcore/arcore-requirement.png)
2. Click **Edit \> Project Settings \> Player**, select the tab with the Android
   icon.

   ![](https://developers.google.com/static/ar/develop/unity-arf/images/enable-arcore/player-android-icon.png)
3. Under **Other Settings \> Identification** , specify a
   **Minimum API Level** that is `24` or higher.

   ![](https://developers.google.com/static/ar/develop/unity-arf/images/enable-arcore/android-minimum-api-level-24.png)

### iOS

1. Navigate to **Edit \> Project Settings \> XR Plug-in Management \>
   ARKit** . **Requirement** is set to **Required** by default.

   ![](https://developers.google.com/static/ar/develop/unity-arf/images/enable-arcore/arkit-requirement.png)
2. Click **Edit \> Project Settings \> Player**, select the tab with the iOS
   icon.

   ![](https://developers.google.com/static/ar/develop/unity-arf/images/enable-arcore/player-ios-icon.png)
3. Under **Other Settings \> Configuration** , specify the
   **[Target minimum iOS Version](https://developers.google.com/ar/devices#ios)** for your app.

   ![](https://developers.google.com/static/ar/develop/unity-arf/images/enable-arcore/ios-target-minimum-version.png)

### Make your app AR Optional

### Android

1. Navigate to **Edit \> Project Settings \> XR Plug-in Management \>
   ARCore**.

2. From the **Requirement** drop-down menu, select **Optional**
   to set your app to AR optional.

   ![](https://developers.google.com/static/ar/develop/unity-arf/images/enable-arcore/arcore-ar-optional.png)
3. Click **Edit \> Project Settings \> Player**, select the tab with the Android
   icon.

   ![](https://developers.google.com/static/ar/develop/unity-arf/images/enable-arcore/player-android-icon.png)
4. Under **Other Settings \> Identification** , specify a
   **Minimum API Level** that is `24` or higher.

   ![](https://developers.google.com/static/ar/develop/unity-arf/images/enable-arcore/android-minimum-api-level-24.png)

### iOS

1. Navigate to **Edit \> Project Settings \> XR Plug-in Management \>
   ARKit**.

2. From the **Requirement** drop-down menu, select **Optional**
   to set your app to AR Optional.

   ![](https://developers.google.com/static/ar/develop/unity-arf/images/enable-arcore/arkit-ar-optional.png)
3. Click **Edit \> Project Settings \> Player**, select the tab with the iOS
   icon.

   ![](https://developers.google.com/static/ar/develop/unity-arf/images/enable-arcore/player-ios-icon.png)
4. Under **Other Settings \> Configuration** , specify the
   **[Target minimum iOS Version](https://developers.google.com/ar/devices#ios)** for your app.

   ![](https://developers.google.com/static/ar/develop/unity-arf/images/enable-arcore/ios-target-minimum-version.png)

## Perform runtime checks

### Check if Google Play Services for AR is installed

Both AR Required and AR Optional apps must use
the [`ARSession.Install()` coroutine](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/api/UnityEngine.XR.ARFoundation.ARSession.html#UnityEngine_XR_ARFoundation_ARSession_Install)
before creating an ARCore session to check whether a compatible version of Google Play Services for AR is (still) installed and to ensure that all required ARCore device profile data has been downloaded.

During runtime, AR Required apps will automatically perform runtime checks to
ensure that the target device:

- Supports ARCore
- Has installed Google Play Services for AR --- if this is not installed (possibly because it was removed by the user) or the version is too old, your app will prompt the user to install or update it.
- Has up-to-date ARCore device profile data --- if it is out of date, your app will download new data.

Set [`ARSession.attemptUpdate`](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/api/UnityEngine.XR.ARFoundation.ARSession.html#UnityEngine_XR_ARFoundation_ARSession_attemptUpdate) to `false` to disable these default checks. Your app
should still handle these conditions:

| Condition | Action |
|---|---|
| Device does not support ARCore. | Hides AR-related functionality. |
| Device supports ARCore, but Google Play Services for AR and/or ARCore device profile data is not installed or out of date. | Prompts the user to install or update Google Play Services for AR and/or ARCore device profile data by calling [`ARSession.Install()`](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/api/UnityEngine.XR.ARFoundation.ARSession.html#UnityEngine_XR_ARFoundation_ARSession_Install). |
| Device supports ARCore and Google Play Services for AR and ARCore device profile data is installed and up to date. | Creates an ARCore `Session` and starts using ARCore. |

You can also check the [`ARSession.state`](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/api/UnityEngine.XR.ARFoundation.ARSession.html#UnityEngine_XR_ARFoundation_ARSession_state) for installation and support states.

## Comply with User Privacy Requirements

To publish your app on the Play Store, make sure that your app complies with ARCore's
[User Privacy Requirements](https://developers.google.com/ar/develop/privacy-requirements).

## What's next

- Learn how to [configure an ARCore session](https://developers.google.com/ar/develop/unity-arf/session-config).