Arcore sdk для android

Содержание
  1. Arcore sdk для android
  2. Quickstart for Android
  3. Requirements
  4. Get the ARCore SDK for Unity
  5. Create a new project and import the SDK
  6. Open the sample scene
  7. Configure project settings
  8. Build and run the sample app
  9. Next Steps
  10. Quickstart for Android
  11. Set up your development environment
  12. Open a sample project
  13. Prepare your device or emulator
  14. Run the sample
  15. Use Instant Placement
  16. Place a virtual object using Instant Placement
  17. Next steps
  18. ARCore SDK for Unity v1.25.0
  19. Breaking & behavioral changes
  20. New APIs and capabilities
  21. Deprecations
  22. Bug fixes
  23. Assets
  24. ARCore SDK for Unity v1.24.0
  25. Breaking & behavioral changes
  26. New APIs and capabilities
  27. Deprecations
  28. Bug fixes
  29. Assets
  30. ARCore SDK for Unity v1.23.0
  31. Known issues
  32. Breaking & behavioral changes
  33. New APIs and capabilities
  34. Deprecations
  35. Other changes
  36. Bug fixes
  37. Assets
  38. ARCore SDK for Unity v1.22.0
  39. Upcoming breaking change affecting Cloud Anchors apps built using ARCore SDK 1.11.0 or earlier
  40. Known issues
  41. Breaking & behavioral changes
  42. New APIs and capabilities
  43. Deprecations
  44. Other changes
  45. Bug fixes
  46. Assets
  47. ARCore SDK for Unity v1.21.0
  48. Upcoming breaking change affecting Cloud Anchors apps built using ARCore SDK 1.11.0 or earlier
  49. Known issues
  50. Breaking & behavioral changes
  51. New APIs and capabilities
  52. Deprecations
  53. Other changes
  54. Bug fixes
  55. Assets
  56. ARCore SDK for Unity v1.20.0
  57. Known issues
  58. Breaking & behavioral changes
  59. New APIs and capabilities
  60. Deprecations
  61. Other changes
  62. Bug fixes
  63. Assets
  64. ARCore SDK for Unity v1.19.0
  65. Breaking change affecting previously published 32-bit-only apps
  66. Known issues
  67. Breaking & behavioral changes
  68. New APIs and capabilities
  69. Deprecations
  70. Bug fixes
  71. Assets
  72. ARCore SDK for Unity v1.18.0
  73. Upcoming breaking change affecting previously published 32-bit-only apps

Arcore sdk для android

ARCore SDK for Android

Copyright 2017 Google LLC

This SDK provides APIs for all of the essential AR features like motion tracking, environmental understanding, and light estimation. With these capabilities you can build entirely new AR experiences or enhance existing apps with AR features.

Breaking change affecting previously published 32-bit-only apps

Google Play Services for AR (ARCore) has removed support for 32-bit-only ARCore-enabled apps running on 64-bit devices. Support for 32-bit apps running on 32-bit devices is unaffected.

If you have published a 32-bit-only ( armeabi-v7a ) version of your ARCore-enabled app without publishing a corresponding 64-bit ( arm64-v8a ) version, you must update your app to include 64-bit native libraries. 32-bit-only ARCore-enabled apps that are not updated by this time may crash when attempting to start an augmented reality (AR) session.

To learn more about this breaking change, and for instructions on how to update your app, see https://developers.google.com/ar/64bit.

The SDK release notes are available on the releases page.

By downloading the ARCore SDK for Android, you agree that the Google APIs Terms of Service governs your use thereof.

User privacy requirements

You must disclose the use of Google Play Services for AR (ARCore) and how it collects and processes data, prominently in your application, easily accessible to users. You can do this by adding the following text on your main menu or notice screen: «This application runs on Google Play Services for AR (ARCore), which is provided by Google LLC and governed by the Google Privacy Policy».

Apps built with ARCore SDK 1.12.0 or higher are covered by the Cloud Anchor API deprecation policy.

Apps built with ARCore SDK 1.11.0 or lower will be unable to host or resolve Cloud Anchors beginning December 2020 due to the SDK’s use of an older, deprecated ARCore Cloud Anchor service.

Источник

Quickstart for Android

Get started with targeting your ARCore Unity apps to Android.

This guide shows you how to set up your development environment and try out an ARCore sample app.

Requirements

Hardware

A USB cable to connect your device to your development machine

Software

Android SDK 4.0 (API Level 14) or later, installed using the SDK Manager in Android Studio

Get the ARCore SDK for Unity

  1. Download ARCore SDK for Unity 1.25.0 or later.
    The SDK is downloaded as arcore-unity-sdk-1.25.0.unitypackage .

Note: Google collects and processes data from your use of the ARCore SDK for Unity pursuant to the Google Privacy Policy and the Google APIs Terms of Service. This data may include, for example, the versions of Unity and the ARCore SDK.

Create a new project and import the SDK

Open Unity and create a new 3D project.

Install version-specific packages.

Unity 2017 or 2018: No additional packages are required. Proceed to the next step.

Unity 2019: Select Window > Package Manager and install the following packages:

  • Multiplayer HLAPI (required by the Cloud Anchors sample)
  • XR Legacy Input Helpers (required by Instant Preview, which uses the TrackedPoseDriver )

Unity 2020: Select Window > Package Manager and install the following packages:

  • Multiplayer HLAPI (required by the Cloud Anchors sample)
  • XR Plugin Management (required by Instant Preview, which uses the TrackedPoseDriver )

Import the ARCore SDK for Unity:

Select Assets > Import Package > Custom Package.

Select the arcore-unity-sdk-1.25.0.unitypackage that you downloaded.

In the Importing Package dialog, make sure that all package options are selected and click Import.

Open the sample scene

  1. In the Unity Project window, you can find the HelloAR sample in:
    Assets/GoogleARCore/Examples/HelloAR/Scenes/ .

Configure project settings

  1. Go to File > Build Settings to open the Build Settings window.
  2. Under Platform, select Android and click Switch Platform.
  3. Click Player Settings.
  4. In the Android settings tab, configure the following settings:
    Section Setting Configuration
    Other Settings Rendering Uncheck Auto Graphics API.
    If Vulkan is listed under Graphics APIs, remove it.
    Multithreaded Rendering Select this option to use multithreaded rendering.

    Note:

    • When building for Android, the Multithreaded Rendering option is supported in ARCore SDK for Unity 1.17.0 or later. However, when this option is enabled in Unity 2018.1 and earlier, using the front-facing (selfie) camera is not supported.
    • 3D assets may not always render correctly when an app places a high load on the rendering thread.
    Package Name Create a unique app ID using a Java package name format.
    For example, use com.example.helloAR .
    Minimum API Level Select Android 7.0 ‘Nougat’ (API Level 24) or higher.
    For AR Optional apps, the Minimum API level is 14.
    Scripting Backend When building for 64-bit devices, set the Scripting Backend to IL2CPP . See ARCore 64-bit requirement for more information.
    Target Architectures When building for 64-bit devices, select ARM64 (requires Scripting Backend set to IL2CPP ). See ARCore 64-bit requirement for more information.
    XR Settings ARCore Supported Enable this option.
Читайте также:  Mortal kombat для android apk

Build and run the sample app

Connect your device to your development machine.

In the Unity Build Settings window, click Build and Run.
Unity builds your project into an Android APK, installs it on your device, and launches it.

Move your device around until ARCore starts detecting and visualizing planes.

Tap a plane to put an Andy Android object on it.

(Optional) Use Android logcat to view log messages or Android Device Monitor to analyze the device more comprehensively.

Next Steps

  • Step through the HelloAR code in the HelloAR Sample App Tour.
  • Learn how to Enable ARCore in your app.
  • Use Augmented Images to build apps that can respond to 2D images, such as posters or logos, in the user’s environment.
  • Use Cloud Anchors to create shared AR experiences across iOS and Android users.
  • Review Runtime Considerations.
  • Review Design Guidelines.

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.

Источник

Quickstart for Android

To get started using ARCore with Android, you can run either the hello_ar_kotlin or hello_ar_java sample app included with the ARCore SDK. These sample apps use OpenGL, a programming interface for rendering 2D and 3D vector graphics. The apps display any detected planes and allow the user to tap on a plane to place a 3D model.

Set up your development environment

Install Android Studio version 3.1 or higher with Android SDK Platform version 7.0 (API level 24) or higher.

Open a sample project

In Android Studio, clone the ARCore SDK GitHub repository.

There are many ways to do this:

For an established Android Studio installation:

  • From the Git menu, select Clone.
  • In the Version control drop-down, select Git as the version control system.

In the URL field, enter the following URL to the ARCore GitHub repository:

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

You can also open a Terminal and issue the git clone command as follows:

Open one of the sample projects as follows (you must explicitly open a project in order to build and run it).

  • From the File menu, select Open.
  • In the arcore-android-sdk/samples folder, select either the hello_ar_kotlin or hello_ar_java folder, and click Open.

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.

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, or manually update it as described in Update Google Play Services for AR.

The hello_ar_java app lets you place a three-dimensional ARCore pawn 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.

Your browser does not support the video tag.

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

  • Try building and running other sample projects in the ARCore SDK.
  • Check out the Augmented Reality codelabs for more sample apps that you can build and run.
  • Learn how to Enable ARCore in your app.
  • Review the Runtime Considerations.
  • Review the Design Guidelines.

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.

Источник

ARCore SDK for Unity v1.25.0

Breaking & behavioral changes

New APIs and capabilities

Deprecations

Bug fixes

  • Various bug fixes and performance improvements.

Assets

ARCore SDK for Unity v1.24.0

Breaking & behavioral changes

  • Performing Frame.Raycast() or Frame.RaycastAll() when the parameter filter is set to TrackableHitFlags.Default and ARCoreSessionConfig.DepthMode is DepthMode.Automatic will now include DepthPoint types in the TrackableHit .

New APIs and capabilities

  • Added new Raw Depth API that provides a depth image without image-space filtering.
    • All devices that support the existing Depth API in ARCore supported devices now also support the new Raw Depth API.
    • Developer guide, Frame.CameraImage.UpdateRawDepthTexture() , Frame.CameraImage.UpdateRawDepthConfidenceTexture() , ARCoreSessionConfig.DepthMode .
  • Added new Custom Data Track Recording/Playback API, augmentations of the recording and playback features that allow developers to record and playback data to and from custom specified tracks, packaged as MP4 recordings. Developer Guide
    • Added ARCoreRecordingConfig.Tracks list to allow the specification of additional tracks to record to when producing a recording.
    • Added Frame.RecordTrackData() to record data to specified additional tracks when producing a recording.
    • Added Frame.GetUpdatedTrackData() to playback data recorded to specified additional tracks in recordings.
  • Added new trackable type DepthPoint that provides a calculated depth pose with each frame by hit testing. These values are sampled from the latest depth image, which yields more accurate results on non-planar or low-texture areas in the environment.
  • Added new setting option Do Not Use in ARCore Project Settings > Android Authentication Strategy and iOS Authentication Strategy.

Deprecations

Bug fixes

  • Various bug fixes and performance improvements.

Assets

ARCore SDK for Unity v1.23.0

Known issues

Breaking & behavioral changes

Changing the camera direction in an active session now requires disabling and enabling the session to take effect. SessionStatus.ErrorInvalidCameraConfig will be thrown if the new camera direction is incompatible with the session configuration.

AR-enabled apps built using ARCore SDK 1.11.0 or earlier are no longer able to host or resolve Cloud Anchors.

  • Cloud Anchors returned by XPSession.CreateCloudAnchor(Anchor) and XPSession.ResolveCloudAnchor(string) will always have state CloudServiceResponse.ErrorInternal .
  • Apps built with ARCore SDK 1.12.0 or later are unaffected. Their use of Cloud Anchors APIs is covered by the deprecation policy.
Читайте также:  Телефоны windows phone или андроиды

New APIs and capabilities

  • Developers can enable ARCore API call logging to the Android debug log by sending a broadcast intent.
  • Developers can enable the ARCore performance overlay by sending a broadcast intent.
  • Added new API for Facing Direction in CameraConfig : Developer guide, addition of FacingDirection property to CameraConfig .
  • Session.Status now returns errror status SessionStatus.ErrorInvalidCameraConfig when ARCore Session failed to find a valid camera config during resuming.

Deprecations

Other changes

  • Upgraded ExternalDependencyManager plugin (formerly PlayServicesResolver) to v1.2.162.
  • Android build now includes Keyless dependencies when ARCoreSessionConfig.CloudAnchorMode is not Disabled and Keyless authentication is selected in Edit > Project Settings > Google ARCore.
  • Removed the unused blur pass parameters from the Depth Effect component.

Bug fixes

  • Various bug fixes and performance improvements.

Assets

ARCore SDK for Unity v1.22.0

Upcoming breaking change affecting Cloud Anchors apps built using ARCore SDK 1.11.0 or earlier

Beginning in January 2021, AR-enabled apps built using ARCore SDK 1.11.0 or earlier will no longer be able to host or resolve Cloud Anchors. Specifically, Cloud Anchors returned by XPSession.CreateCloudAnchor(Anchor) and XPSession.ResolveCloudAnchor(string) will always have the state CloudServiceResponse.ErrorInternal .

Apps built with ARCore SDK 1.12.0 or later are unaffected. Their use of Cloud Anchors APIs is covered by the Cloud Anchors deprecation policy.

Known issues

  • Support for stereo camera depth is expected to become available in ARCore SDK 1.23.0.
  • Apps may crash when calling Application.Quit() . This affects all ARCore app. See details in Unity’s Issue Tracker.
  • Issue 141500087: When using Android Emulator x86_64 system images on macOS with ARCore SDK 1.16.0 or later, Google Play Services for AR will crash. As a workaround, use an x86 system image.

Breaking & behavioral changes

New APIs and capabilities

Deprecations

Other changes

Bug fixes

Assets

ARCore SDK for Unity v1.21.0

Upcoming breaking change affecting Cloud Anchors apps built using ARCore SDK 1.11.0 or earlier

Beginning in December 2020, AR-enabled apps built using ARCore SDK 1.11.0 or earlier will no longer be able to host or resolve Cloud Anchors. Specifically, Cloud Anchors returned by XPSession.CreateCloudAnchor(Anchor) and XPSession.ResolveCloudAnchor(string) will always have the state CloudServiceResponse.ErrorInternal .

Apps built with ARCore SDK 1.12.0 or later are unaffected. Their use of Cloud Anchors APIs is covered by the Cloud Anchors deprecation policy.

Читайте также:  Планшет андроид не загружаются

Known issues

  • Apps may crash when calling Application.Quit() . This affects all ARCore app. See details in Unity’s Issue Tracker.
  • Issue 141500087: When using Android Emulator x86_64 system images on macOS with ARCore SDK 1.16.0 or later, Google Play Services for AR will crash. As a workaround, use an x86 system image.

Breaking & behavioral changes

New APIs and capabilities

  • Added Recording and Playback of ARCore datasets. The Recording feature lets the app capture the data required to replay the AR session. Developer guide, Session.RecordingStatus , Session.StartRecording(ARCoreRecordingConfig) , Session.StopRecording() , Session.PlaybackStatus , Session.SetPlaybackDataset(string) .
  • Added new APIs for Stereo Camera usage in CameraConfigFilter and CameraConfig : Developer guide, addition of StereoCameraUsage property to CameraConfig , ARCoreCameraConfigFilter.StereoCameraUsage .
    • Support for stereo camera depth is expected to become available in ARCore SDK 1.22.0.

Deprecations

Other changes

  • Changes to the HelloAR sample:
    • Added a Depth check to reduce unnecessary logging.
    • Added a setting to toggle Instant Placement mode.
  • Changed minimum supported version of Unity to 2017.4.40.

Bug fixes

Assets

ARCore SDK for Unity v1.20.0

Known issues

  • Apps may crash when calling Application.Quit() . This affects all ARCore app. See details in Unity’s Issue Tracker.
  • Issue 141500087: When using Android Emulator x86_64 system images on macOS with ARCore SDK 1.16.0 or later, Google Play Services for AR will crash. As a workaround, use an x86 system image.
  • Issue 1276856 Unity removed support for OpenGLES2 in «ARCore Supported» apps in 2018.4.26. Apps must disable Project Settings > Other Settings > Auto Graphics API, and then only include OpenGLES3 in the Graphics APIs list.

Breaking & behavioral changes

  • CameraConfigDepthSensorUsages has been renamed to CameraConfigDepthSensorUsage .
  • Beginning in December 2020, AR-enabled apps built using ARCore SDK 1.11.0 or earlier will no longer be able to host or resolve Cloud Anchors. Apps built with ARCore SDK 1.12.0 or later are unaffected. To learn more about this breaking change, and for instructions on how to update your app, see the Cloud Anchors deprecation policy.

New APIs and capabilities

  • Added persistent Cloud Anchors, which let you increase the time-to-live (TTL) of Cloud Anchors to 365 days. With the Cloud Anchor Management API, you can also extend the lifetime of a Cloud Anchor. Use of persistent Cloud Anchors is covered by the new Cloud Anchors deprecation policy.
    • Added XPSession.CreateCloudAnchor(Anchor, int) .
    • Added XPSession.EstimateFeatureMapQualityForHosting(Pose) .
    • iOS only:
      • Added XPSession.SetAuthToken(string) .
      • Added XPSession.CreateCloudAnchor(UnityARUserAnchorComponent, int)

Deprecations

Other changes

  • Added a Depth check to the HelloAR sample to reduce unnecessary logging.
  • The HelloAR sample now includes the settings to toggle Instant Placement mode in runtime.
  • Changed the HelloAR sample to acquire depth images only when tracking is active. This avoids logging unactionable errors when tracking is not active.
  • CloudAnchors and PersistentCloudAnchors scenes now use the camera included in ARCoreDevice prefab.

Bug fixes

  • Fixed NullReferenceException in PointcloudVisualizerEditor affecting newer versions of Unity, due to Unity’s renaming of the internal _script property to m_Script .

Assets

ARCore SDK for Unity v1.19.0

Breaking change affecting previously published 32-bit-only apps

Google Play Services for AR (ARCore) has removed support for 32-bit-only ARCore-enabled apps running on 64-bit devices. Support for 32-bit apps running on 32-bit devices is unaffected.

If you have published a 32-bit-only ( armeabi-v7a ) version of your ARCore-enabled app without publishing a corresponding 64-bit ( arm64-v8a ) version, you must update your app to include 64-bit native libraries. 32-bit-only ARCore-enabled apps that are not updated may crash when attempting to start an augmented reality (AR) session.

To learn more about this breaking change, and for instructions on how to update your app, see https://developers.google.com/ar/64bit.

Known issues

  • Apps may crash when calling Application.Quit() . This affects all ARCore apps. See details in Unity’s Issue Tracker.
  • Issue 141500087: When using Android Emulator x86_64 system images on macOS with ARCore SDK 1.16.0 or later, Google Play Services for AR will crash. As a workaround, use an x86 system image.
  • Unity 2018.4.24f1 is the minimum supported 2018.4 version that allows use of a custom Gradle template. See details in 2018.4.24f1 Release Notes.
  • Unity 2019.3.7f1 is the minimum supported 2019.3 version that allows overwriting launcher and main Gradle templates. See details in 2019.3.7f1 Release Notes.

Breaking & behavioral changes

  • To support Android 11, the ARCore SDK for Unity now requires Gradle version 5.6.4 or later. For details, refer to Android 11.

New APIs and capabilities

  • Added new Instant Placement APIs:
    • New InstantPlacementMode Enum type.
    • New InstantPlacementMode property in ARCoreSessionConfig to enable Instant Placement in ARCore session.
    • New InstantPlacementPoint Trackable.
    • Added Frame.RaycastInstantPlacement() to perform a raycast against an Instant Placement Point.

Deprecations

Bug fixes

  • Fixed #710: Unity Editor crashes when running Instant Preview.

Assets

ARCore SDK for Unity v1.18.0

Upcoming breaking change affecting previously published 32-bit-only apps

In August 2020, Google Play Services for AR (ARCore) will remove support
for 32-bit-only ARCore-enabled apps running on 64-bit devices. Support for
32-bit apps running on 32-bit devices is unaffected.

If you have published a 32-bit-only ( armeabi-v7a ) version of your
ARCore-enabled app without publishing a corresponding 64-bit ( arm64-v8a )
version, you must update your app to include 64-bit native libraries before
August 2020. 32-bit-only ARCore-enabled apps that are not updated by this time
may crash when attempting to start an augmented reality (AR) session.

Источник

Оцените статью