A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.google.com/ar/develop/c/quickstart below:

Quickstart for Android NDK | ARCore

Quickstart for Android NDK

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

Set up your development environment Prepare your device or emulator

You can run AR apps on a supported device 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 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 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.

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.

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 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.

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

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-14 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-14 UTC."],[[["Install Android Studio and the necessary components like NDK, CMake, and the ARCore SDK to set up your development environment."],["Run AR apps on a supported device or in the Android emulator, ensuring Google Play Services for AR is updated."],["Explore the sample project \"hello_ar_c\" to understand basic AR functionalities, including surface detection and object placement."],["Utilize Instant Placement for faster object placement and Depth API for realistic occlusion and depth perception in your AR experiences."],["Enhance your AR apps with features like Augmented Images, Cloud Anchors, and adhere to design guidelines and runtime considerations for optimal performance."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4