November 2022 deprecated camera methods removal for ARCore SDK for Android NDK (AR Foundation)

In November 2022, Google Play Services for AR will remove deprecated methods related to NDK camera images and metadata.

Apps using these methods in affected versions of AR Foundation might start to behave differently or crash when users update Google Play Services for AR.

Affected apps

Beginning in November 2022, your app may stop working or crash when users update to the latest version of Google Play Services for AR if:

  1. Your app was compiled with an affected SDK
  2. Your app uses any of the following affected APIs:
If your app was compiled with
AR Foundation version…
And uses affected APIs… Breaking behavior starting in November 2022
AR Foundation 2.1 (Unity 2019 LTS) XRCameraSubsystem.TryGetLatestImage(out XRCameraImage) Returns false.

Fix affected apps

Affected apps may see breakage in November 2022. To mitigate this, update to the latest version of AR Foundation that your version of Unity supports. At a minimum, update to AR Foundation version 4.x or higher.

Verify affected app is fixed

Test the app by simulating the November 2022 changes in advance by adding a special meta-data entry to your app's AndroidManifest.xml:

  1. Ensure Play Services for AR version 1.29.0 or higher is installed on the target device.
  2. Add a new <meta-data> tag as a child of the existing <application> element in the app's custom AndroidManifest.xml file :

    <application …>
      …
    
      <!--
           Simulate the November 2022 changes in advance.
           IMPORTANT: Remove this tag when testing is completed.
           Do not include this tag in published versions of your app.
      -->
      <meta-data android:name="com.google.ar.core.session_settings"
                 android:value="camera_stack_option,unified_mono" />
    </application>
    
  3. Test your app and verify that all ARCore features are functioning as expected.

  4. Remove the <meta-data> tag when testing is complete. Leaving this tag in place in your published app could result in unexpected behavior in the future.

If the app functions normally, then the app is ready for the changes in November 2022.

Timeline

Period Events
November 2020
(ARCore SDK version 1.20.0)
Deprecate native APIs.
Update implementation to use alternate native APIs.
November 2021 Announce future breaking change due to pending removal of implementation of affected APIs from Google Play Services for AR in November 2022.
November 2022 Remove implementation of affected APIs from Google Play Services for AR.
Introduce breaking change for apps using ARCore versions prior to 1.23.0.