![](https://developers.google.com/static/ar/develop/c/images/android-studio.png)

## Set up your development environment

- Install [Android Studio](https://developer.android.com/studio/index.html)
  version 3.1 or higher with Android SDK Platform version 7.0 (API level 24)
  or higher.

- Prepare Android Studio for native development by installing Android Native
  Development Kit (NDK) and CMake with the [SDK Manager](https://developer.android.com/studio/intro/update.html#sdk-manager). For more information, see
  [Getting Started with the NDK](https://developer.android.com/ndk/guides/index.html).

- You will need to get the ARCore SDK for Android. You can either:

  - Download the [ARCore SDK for Android](https://github.com/google-ar/arcore-android-sdk/releases) and
    extract it.

    -or-
  - Clone the repository with the following command:

    ```
    git clone https://github.com/google-ar/arcore-android-sdk.git
    ```

## Prepare your device or emulator

You can run AR apps on a [supported device](https://developers.google.com/ar/devices) or
in the Android Emulator. You must update Google Play Services for AR
on the emulator before running the app. See
[Run AR Apps in Android Emulator](https://developers.google.com/ar/develop/java/emulator#update-arcore) for more
information.

## Open the sample project

In Android Studio, open the **hello_ar_c** sample project in `<ARCore SDK Folder>/samples/hello_ar_c`.

The sample project has build dependencies on certain versions of software, such
as Gradle and the Android SDK. If the required dependencies are not installed,
Android Studio will ask you for permission to download and install them on your
machine.

## Run the sample

Make sure your Android device is connected to the development machine and click
**Run** ![](https://developers.google.com/static/ar/develop/c/images/toolbar-run.png) 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](https://developer.android.com/studio/run/index.html).

![](https://developers.google.com/static/ar/develop/java/images/hello-ar-demo.png)

As you move your device, the app automatically detects flat surfaces and draws a
diamond grid. Tap the grid to place a three-dimensional ARCore pawn on the
surface.

## 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
object automatically updates to be pose-accurate.

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.

![Instant Placement](https://developers.google.com/static/ar/images/instant-placement/instant-placement.png "Instant Placement")

In Figure 1, Instant Placement is disabled and surface geometry is undefined.
Objects placed on the floor to the right of the pool table (four small blue dots)
appear knocked-over, their poses are undefined.

In Figure 2, Instant Placement is enabled from the menu under the gear icon.

In Figure 3, with Instant Placement enabled, a new object is placed in the scene.
It appears in grayscale, instead of colored, to denote that it has not been
corrected for an accurate pose yet.

In Figure 4, the new object becomes colored, and its pose is accurate, when the
surface geometry (described by the *trackable* grid lines) is detected.

### Use Depth

When [Depth](https://developers.google.com/ar/develop/depth) is enabled, ARCore takes into account the geometry and location of objects in the scene, and computes the location of
objects placed in the scene relative to other objects in the scene. It allows
placed objects to be occluded by objects in the scene, and lends realism to
your app.

![Instant Placement](https://developers.google.com/static/ar/images/depth/depth.png "Instant Placement")

In Figure 1, Depth is disabled. An object is placed under the pool table.

In Figure 2, as the device moves around the pool table, the object appears
to follow the device irrespective of objects in the scene.

In Figure 3, Depth is enabled.

In Figure 4, the object now appears occluded by the pool table as the device
moves around the scene.

## Next steps

- Learn how to [Enable ARCore](https://developers.google.com/ar/develop/c/enable-arcore) in your app.
- Use [Augmented Images](https://developers.google.com/ar/develop/c/augmented-images) to build apps that can respond to 2D images, such as posters or logos, in the user's environment.
- Use [Cloud Anchors](https://developers.google.com/ar/develop/c/cloud-anchors/cloud-anchors-overview-c)
- Use the [Depth API](https://developers.google.com/ar/develop/c/depth/overview) to ensure accurate depth for realistic and immersive user experiences.
- Use [Instant Placement](https://developers.google.com/ar/develop/c/instant-placement/overview) to quickly place AR objects on the screen.
- Review [Runtime Considerations](https://developers.google.com/ar/develop/c/runtime).
- Review [Design Guidelines](https://developers.google.com/ar/develop/developer-guides/design-guidelines).