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 the ARCore SDK 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:
- Your app was compiled with an affected SDK
- Your app uses any of the following affected APIs:
If your app was compiled with ARCore SDK version… |
And uses affected APIs… | Breaking behavior starting in November 2022 |
---|---|---|
1.19.0 or lower | Frame.getImageMetadata() |
Throws IllegalArgumentException . |
1.10.0 or lower | Frame.acquireCameraImage() |
Returns a 0x0 sized image. |
Fix affected apps
Affected apps may see breakage in November 2022. To mitigate this, rebuild your app using the latest ARCore SDK. At a minimum, you must upgrade to ARCore SDK version 1.20.0 or later.
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
:
- Ensure Play Services for AR version 1.29.0 or higher is installed on the target device.
Add a new
<meta-data>
tag as a child of the existing<application>
element in the app'sAndroidManifest.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>
Test your app and verify that all ARCore features are functioning as expected.
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.20.0. |