[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eIn November 2022, Google Play Services for AR will remove deprecated methods impacting apps using ARCore SDK versions older than 1.23.0.\u003c/p\u003e\n"],["\u003cp\u003eApps built with affected SDKs and using specific APIs might crash or behave differently after the November 2022 update.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers should use drop-in replacements for the deprecated methods to ensure app compatibility.\u003c/p\u003e\n"],["\u003cp\u003eTesting app functionality with a special meta-data tag in the AndroidManifest.xml can help verify the fix before the November 2022 changes.\u003c/p\u003e\n"],["\u003cp\u003eA timeline outlining the deprecation and removal of the affected APIs is provided for reference.\u003c/p\u003e\n"]]],["Google Play Services for AR will remove deprecated NDK camera methods in November 2022, potentially causing crashes in apps using ARCore SDK versions below 1.23.0. To fix this, developers should replace `ArImage_getNdkImage()` with `ArImage` methods and `ArImage_getNdkCameraMetadata()` with `ArImageMetadata_getConstEntry()`. Developers can test the fix by adding a `meta-data` tag in the `AndroidManifest.xml` file and must remove this tag after testing. Apps using ARCore 1.23.0 or later are unaffected.\n"],null,["# November 2022 deprecated camera methods removal for ARCore SDK for Android NDK (C)\n\nIn November 2022, *Google Play Services for AR* will remove deprecated methods\nrelated to NDK camera images and metadata.\n\nApps using these methods in affected versions of\n\nthe ARCore SDK\n\nmight start to\nbehave differently or crash when users update Google Play Services for AR.\n\nAffected apps\n-------------\n\n| **Important:** Apps compiled with ARCore SDK version 1.23.0 or later will not be affected.\n\nBeginning in November 2022, your app may stop working or crash when users update\nto the latest version of *Google Play Services for AR* if:\n\n1. Your app was compiled with an affected SDK\n2. Your app uses any of the following affected APIs:\n\n| If your app was compiled with ARCore SDK version... | And uses affected APIs... | Breaking behavior starting in November 2022 |\n|-----------------------------------------------------|--------------------------------------------------------------------------------------------|-----------------------------------------------------------|\n| 1.22.0 or lower | [`ArImage_getNdkImage()`](/ar/reference/deleted-c) (removed in ARCore SDK 1.23.0) | Returns `NULL` in the resulting `AImage` struct. |\n| 1.22.0 or lower | [`ArImage_getNdkCameraMetadata()`](/ar/reference/deleted-c) (removed in ARCore SDK 1.23.0) | Returns `NULL` in the resulting `ACameraMetadata` struct. |\n\nFix affected apps\n-----------------\n\nAffected apps may see breakage in November 2022. To mitigate this,\nuse drop-in replacements for affected methods:\n\n- [`ArImage_getNdkImage()`](/ar/reference/deleted-c) and [`AImage_*`](https://developer.android.com/ndk/reference/group/media#aimage_getcroprect) methods: Use corresponding methods from [`ArImage`](/ar/reference/c/group/ar-image#functions). For example:\n - [`AImage_getNumberOfPlanes()`](https://developer.android.com/ndk/reference/group/media#aimage_getnumberofplanes) becomes [`ArImage_getNumberOfPlanes()`](/ar/reference/c/group/ar-image#arimage_getnumberofplanes)\n - [`AImage_getPlaneData()`](https://developer.android.com/ndk/reference/group/media#aimage_getplanedata) becomes [`ArImage_getPlaneData()`](/ar/reference/c/group/ar-image#arimage_getplanedata)\n- [`ArImage_getNdkCameraMetadata()`](/ar/reference/deleted-c): Use [`ArImageMetadata_getConstEntry()`](/ar/reference/c/group/ar-image-metadata#arimagemetadata_getconstentry) instead\n\nVerify affected app is fixed\n----------------------------\n\nTest the app by simulating the November 2022 changes in advance by adding a special `meta-data` entry to your app's `AndroidManifest.xml`:\n\n\n1. Ensure *Play Services for AR* version 1.29.0 or higher is installed on the target device.\n2. Add a new `\u003cmeta-data\u003e` tag as a child of the existing `\u003capplication\u003e` element in the app's\n\n `AndroidManifest.xml` file\n\n :\n\n \u003capplication ...\u003e\n ...\n\n \\\u003c!--\n Simulate the November 2022 changes in advance.\n IMPORTANT: Remove this tag when testing is completed.\n Do not include this tag in published versions of your app.\n --\\\u003e\n \\\u003cmeta-data android:name=\"com.google.ar.core.session_settings\"\n android:value=\"camera_stack_option,unified_mono\" /\\\u003e\n \u003c/application\u003e\n\n3. Test your app and verify that all ARCore features are functioning as\n expected.\n\n4. Remove the `\u003cmeta-data\u003e` tag when testing is complete. Leaving this tag\n in place in your published app could result in unexpected behavior in the\n future.\n\nIf the app functions normally, then the app is ready for the changes in November 2022.\n\nTimeline\n--------\n\n| Period | Events |\n| November 2020 (ARCore SDK version 1.20.0) | Deprecate affected APIs, introduce drop-in API alternatives. |\n| February 2021 (ARCore SDK version 1.23.0) | Remove previously deprecated APIs signatures from ARCore SDK. |\n| November 2021 | Announce future breaking change due to pending removal of implementation of affected APIs from Google Play Services for AR in November 2022. |\n| 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. |\n|-------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------|"]]