Enable AR in your AR Foundation app (Android only)

Stay organized with collections Save and categorize content based on your preferences.

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 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 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 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 RequiredAR 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. Your app follows normal listing procedures.
Google Play Services for AR installation method The Play Store installs Google Play Services for AR alongside your app. Your app uses ARSession.state 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 to check ARCore support and install status

Make your app AR Required

Android

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

  2. Click Edit > Project Settings > Player, select the tab with the Android icon.

  3. Under Other Settings > Identification, specify a Minimum API Level that is 24 or higher.

iOS

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

  2. Click Edit > Project Settings > Player, select the tab with the iOS icon.

  3. Under Other Settings > Configuration, specify the Target minimum iOS Version for your app.

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.

  3. Click Edit > Project Settings > Player, select the tab with the Android icon.

  4. Under Other Settings > Identification, specify a Minimum API Level that is 24 or higher.

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.

  3. Click Edit > Project Settings > Player, select the tab with the iOS icon.

  4. Under Other Settings > Configuration, specify the Target minimum iOS Version for your app.

Perform runtime checks

Check if Google Play Services for AR is installed

Both AR Required and AR Optional apps must call ARSession.state 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 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().
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 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.

What’s next