Google is committed to advancing racial equity for Black communities. See how.

Quickstart for Android

Set up your development environment

Open the sample project

This quickstart uses OpenGL, a programming interface for rendering 2D and 3D vector graphics. Review the Enable ARCore documentation before getting started with the steps below.

Get the sample project by cloning the repository with the following command:

git clone

In Android Studio, open the hello_ar_java sample project, located in the samples subdirectory within the arcore-android-sdk directory.

Prepare your device or emulator

You can run AR apps on a supported device or in the Android Emulator:

Run the sample

Make sure your Android device is connected to the development machine and click Run in Android Studio.

Android Studio builds your project into a debuggable APK, installs the APK, and then runs the app on your device. For more information, see Build and Run Your App.

You may be prompted to install or update Google Play Services for AR if it is missing or out of date. Select CONTINUE to install it from Google Play Store.

The hello_ar_java app lets you place and manipulate Android figurines on detected AR plane surfaces. It is implemented with Android GL SurfaceView, which is used to render the camera preview and basic AR objects such as Planes and Anchors. hello_ar_java's sample rendering framework can be found in com/google/ar/core/examples/java/common/samplerender.

Use Instant Placement

The Instant Placement API allows the user to place an AR object on the screen without having to wait for ARCore to detect surface geometry. Object placement is refined in real time as the user moves further around the environment. Once ARCore detects the correct pose in the region where the AR object is placed, the white object automatically updates to be pose-accurate, and becomes opaque.

Place a virtual object using Instant Placement

Instant Placement is automatically enabled in hello_ar_java. Tap the gear icon on the screen and choose Instant Placement in the drop-down menu. The Enable Instant Placement checkbox should already be selected.

Tap on the screen to place an object. Make sure to continue moving the device around after seeing the holographic object appear on screen, so that ARCore can get sufficient data about your surroundings to accurately anchor the virtual object.

Next steps