Skip to content

Commit

Permalink
ARCore Android SDK v1.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nvictornvictor committed Sep 12, 2019
1 parent bb9fa28 commit 525add1
Show file tree
Hide file tree
Showing 26 changed files with 768 additions and 119 deletions.
18 changes: 6 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# How to Contribute

We'd love to accept your patches and contributions to the source code included
in this project. There are just a few small guidelines you need to follow.
Please use the [issue tracker](https://github.com/google-ar/arcore-android-sdk/issues)
to report any issue as we do not accept pull requests for this repository.

If you'd like to send us a patch or pull request, there are just a few small
guidelines you need to follow.

## Contributor License Agreement

Expand All @@ -15,16 +18,7 @@ You generally only need to submit a CLA once, so if you've already submitted one
(even if it was for a different project), you probably don't need to do it
again.

## Code reviews

Although we do not use the normal GitHub pull request process to incorporate
contributions, it's okay to send us pull requests. Once we have received your
CLA we will review and consider your contribution for inclusion in a future
release of the SDK.

## Community Guidelines

This project follows
[Google's Open Source Community
This project follows [Google's Open Source Community
Guidelines](https://opensource.google.com/conduct/).

271 changes: 271 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

Binary file added assets/canonical_face_texture.psd
Binary file not shown.
73 changes: 42 additions & 31 deletions libraries/include/arcore_c_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,8 @@ typedef struct ArAnchorList_ ArAnchorList;

// Segment3D.

// SurfelList.

// Hit result functionality.

/// @addtogroup hit
Expand Down Expand Up @@ -782,12 +784,9 @@ AR_DEFINE_ENUM(ArCloudAnchorState){
/// present in the manifest.
AR_CLOUD_ANCHOR_STATE_ERROR_NOT_AUTHORIZED = -2,

/// The ARCore Cloud was unreachable. This can happen because of a number of
/// reasons. The request sent to the server could have timed out with no
/// response, there could be a bad network connection, DNS unavailability,
/// firewall issues, or anything that could affect the device's ability to
/// connect to the ARCore Cloud.
AR_CLOUD_ANCHOR_STATE_ERROR_SERVICE_UNAVAILABLE = -3,
AR_CLOUD_ANCHOR_STATE_ERROR_SERVICE_UNAVAILABLE AR_DEPRECATED(
"AR_CLOUD_ANCHOR_STATE_ERROR_SERVICE_UNAVAILABLE is deprecated in "
"ARCore SDK 1.12. See release notes to learn more.") = -3,

/// The application has exhausted the request quota allotted to the given
/// API key. The developer should request additional quota for the ARCore
Expand All @@ -803,11 +802,9 @@ AR_DEFINE_ENUM(ArCloudAnchorState){
/// cloud anchor ID.
AR_CLOUD_ANCHOR_STATE_ERROR_CLOUD_ID_NOT_FOUND = -6,

/// The server could not match the visual features provided by ARCore
/// against the localization dataset of the requested cloud anchor ID. This
/// means that the anchor pose being requested was likely not created in the
/// user's surroundings.
AR_CLOUD_ANCHOR_STATE_ERROR_RESOLVING_LOCALIZATION_NO_MATCH = -7,
AR_CLOUD_ANCHOR_STATE_ERROR_RESOLVING_LOCALIZATION_NO_MATCH AR_DEPRECATED(
"AR_CLOUD_ANCHOR_STATE_ERROR_RESOLVING_LOCALIZATION_NO_MATCH is "
"deprecated in ARCore SDK 1.12. See release notes to learn more.") = -7,

/// The anchor could not be resolved because the SDK used to host the anchor
/// was newer than and incompatible with the version being used to acquire
Expand All @@ -817,7 +814,17 @@ AR_DEFINE_ENUM(ArCloudAnchorState){
/// The anchor could not be acquired because the SDK used to host the anchor
/// was older than and incompatible with the version being used to acquire
/// it.
AR_CLOUD_ANCHOR_STATE_ERROR_RESOLVING_SDK_VERSION_TOO_NEW = -9};
AR_CLOUD_ANCHOR_STATE_ERROR_RESOLVING_SDK_VERSION_TOO_NEW = -9,

/// The ARCore Cloud Anchor Service was unreachable. This can happen because
/// of a number of reasons. The device may is in airplane mode or does not
/// have a working internet connection. The request sent to the server could
/// have timed out with no response, there could be a bad network
/// connection, DNS unavailability, firewall issues, or anything that could
/// affect the device's ability to connect to the ARCore Cloud Anchor
/// service.
AR_CLOUD_ANCHOR_STATE_ERROR_HOSTING_SERVICE_UNAVAILABLE = -10,
};

/// @ingroup arcoreapk
/// Describes the current state of ARCore availability on the device.
Expand Down Expand Up @@ -1275,8 +1282,8 @@ void ArConfig_getLightEstimationMode(
const ArConfig *config,
ArLightEstimationMode *light_estimation_mode);

/// Sets the lighting estimation mode that should be used. See
/// ::ArLightEstimationMode for available options.
/// Sets the desired lighting estimation mode. See ::ArLightEstimationMode for
/// available options.
void ArConfig_setLightEstimationMode(
const ArSession *session,
ArConfig *config,
Expand All @@ -1288,8 +1295,8 @@ void ArConfig_getPlaneFindingMode(const ArSession *session,
const ArConfig *config,
ArPlaneFindingMode *plane_finding_mode);

/// Sets the plane finding mode that should be used. See
/// ::ArPlaneFindingMode for available options.
/// Sets the desired plane finding mode. See ::ArPlaneFindingMode for available
/// options.
void ArConfig_setPlaneFindingMode(const ArSession *session,
ArConfig *config,
ArPlaneFindingMode plane_finding_mode);
Expand All @@ -1311,8 +1318,8 @@ void ArConfig_getCloudAnchorMode(const ArSession *session,
const ArConfig *config,
ArCloudAnchorMode *out_cloud_anchor_mode);

/// Sets the cloud configuration that should be used. See ::ArCloudAnchorMode
/// for available options.
/// Sets the desired cloud configuration. See ::ArCloudAnchorMode for available
/// options.
void ArConfig_setCloudAnchorMode(const ArSession *session,
ArConfig *config,
ArCloudAnchorMode cloud_anchor_mode);
Expand Down Expand Up @@ -1343,28 +1350,30 @@ void ArConfig_getAugmentedFaceMode(const ArSession *session,
const ArConfig *config,
ArAugmentedFaceMode *augmented_face_mode);

/// Sets the face mode that should be used. See @c ArAugmentedFaceMode for
/// Sets the desired face mode. See @c ArAugmentedFaceMode for
/// available options. Augmented Faces is currently only supported when using
/// the front-facing (selfie) camera. See #AR_SESSION_FEATURE_FRONT_CAMERA for
/// details.
void ArConfig_setAugmentedFaceMode(const ArSession *session,
ArConfig *config,
ArAugmentedFaceMode augmented_face_mode);

/// Sets the desired focus mode that should be used. See ::ArFocusMode for
/// available options.
/// Sets the desired focus mode. See ::ArFocusMode for available options.
///
/// Currently, the default focus mode is AR_FOCUS_MODE_FIXED, but this default
/// might change in the future. Note, on devices where ARCore does not support
/// auto focus due to the use of a fixed focus camera, setting
/// AR_FOCUS_MODE_AUTO will be ignored.
/// The default focus mode varies by device and camera, and is set to optimize
/// AR tracking. Currently the default on most ARCore devices and cameras is
/// AR_FOCUS_MODE_FIXED, although this default might change in the future.
///
/// To determine whether the configured ARCore camera supports auto focus, check
/// ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE, which is 0 for fixed-focus
/// cameras. If the camera does not support different focus modes, this setting
/// will be ignored. See the ARCore Supported Devices
/// Note, on devices where ARCore does not support auto focus due to the use of
/// a fixed focus camera, setting AR_FOCUS_MODE_AUTO will be ignored. Similarly,
/// on devices where tracking requires auto focus, setting AR_FOCUS_MODE_FIXED
/// will be ignored. See the ARCore supported devices
/// (https://developers.google.com/ar/discover/supported-devices) page for a
/// list of affected devices.
///
/// To determine whether the configured ARCore camera supports auto focus, check
/// ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE, which is 0 for fixed-focus
/// cameras.
void ArConfig_setFocusMode(const ArSession *session,
ArConfig *config,
ArFocusMode focus_mode);
Expand Down Expand Up @@ -1485,7 +1494,7 @@ AR_DEFINE_ENUM(ArCameraConfigTargetFps){
///
/// Increases power consumption and may increase app memory usage.
///
/// See the ARCore Supported Devices
/// See the ARCore supported devices
/// (https://developers.google.com/ar/discover/supported-devices)
/// page for a list of devices that currently support 60fps.
///
Expand All @@ -1501,7 +1510,7 @@ AR_DEFINE_ENUM(ArCameraConfigDepthSensorUsage){
/// configs that require a depth sensor to be present on the device, and
/// that will be used by ARCore.
///
/// See the ARCore Supported Devices
/// See the ARCore supported devices
/// (https://developers.google.com/ar/discover/supported-devices)
/// page for a list of devices that currently have supported depth sensors.
///
Expand Down Expand Up @@ -2398,6 +2407,8 @@ void ArFrame_getUpdatedTrackables(const ArSession *session,
ArTrackableType filter_type,
ArTrackableList *out_trackable_list);

// === Scene Structure methods ===

/// @}

// === ArPointCloud methods ===
Expand Down
16 changes: 13 additions & 3 deletions samples/augmented_image_c/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ def arcore_libpath = "${buildDir}/arcore-native"
// Create a configuration to mark which aars to extract .so files from
configurations { natives }

def setVersionName = { ->
if (project.hasProperty("androidVersionName")) {
println("Replacing versionName with supplied build parameter: " +
"$androidVersionName")
return androidVersionName
} else {
return "1.0"
}
}

android {
compileSdkVersion 27
defaultConfig {
Expand All @@ -18,7 +28,7 @@ android {
minSdkVersion 24
targetSdkVersion 27
versionCode 1
versionName "1.0"
versionName setVersionName()

externalNativeBuild {
cmake {
Expand Down Expand Up @@ -52,8 +62,8 @@ android {

dependencies {
// ARCore library
implementation 'com.google.ar:core:1.11.0'
natives 'com.google.ar:core:1.11.0'
implementation 'com.google.ar:core:1.12.0'
natives 'com.google.ar:core:1.12.0'

implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
Expand Down
14 changes: 12 additions & 2 deletions samples/augmented_image_java/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
apply plugin: 'com.android.application'

def setVersionName = { ->
if (project.hasProperty("androidVersionName")) {
println("Replacing versionName with supplied build parameter: " +
"$androidVersionName")
return androidVersionName
} else {
return "1.0"
}
}

android {
compileSdkVersion 28
defaultConfig {
Expand All @@ -9,7 +19,7 @@ android {
minSdkVersion 24
targetSdkVersion 28
versionCode 1
versionName "1.0"
versionName setVersionName()
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand All @@ -25,7 +35,7 @@ android {

dependencies {
// ARCore library
implementation 'com.google.ar:core:1.11.0'
implementation 'com.google.ar:core:1.12.0'

// Obj - a simple Wavefront OBJ file loader
// https://github.com/javagl/Obj
Expand Down
14 changes: 12 additions & 2 deletions samples/cloud_anchor_java/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
apply plugin: 'com.android.application'

def setVersionName = { ->
if (project.hasProperty("androidVersionName")) {
println("Replacing versionName with supplied build parameter: " +
"$androidVersionName")
return androidVersionName
} else {
return "1.0"
}
}

android {
compileSdkVersion 28
defaultConfig {
Expand All @@ -9,7 +19,7 @@ android {
minSdkVersion 24
targetSdkVersion 28
versionCode 1
versionName "1.0"
versionName setVersionName()
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand All @@ -25,7 +35,7 @@ android {

dependencies {
// ARCore library
implementation 'com.google.ar:core:1.11.0'
implementation 'com.google.ar:core:1.12.0'

// Obj - a simple Wavefront OBJ file loader
// https://github.com/javagl/Obj
Expand Down
4 changes: 3 additions & 1 deletion samples/cloud_anchor_java/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018 Google Inc.
Copyright 2019 Google LLC.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -21,6 +21,8 @@
<uses-permission android:name="android.permission.CAMERA"/>

<uses-permission android:name="android.permission.INTERNET" />

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<!-- This tag indicates that this application requires ARCore. This results in the application
only being visible in the Google Play Store on devices that support ARCore. -->
<uses-feature android:name="android.hardware.camera.ar" android:required="true"/>
Expand Down
Loading

0 comments on commit 525add1

Please sign in to comment.