# Migrate QR Code Tracking

The QR code tracking API now uses the same API as the Google Android XR Extensions for Unity package, which is based on the Image Tracking API from Unity’s AR Foundation.

To migrate:

1. Replace the SpacesQRCodeManager with the AR Tracked Image Manager.
2. Create a new XR Reference Image Library that contains a target image called `qrcode` without any texture associated with it.
3. Use the Spaces Runtime Image Configurator to define tracking modes. The `Adaptive` is not supported on Android XR devices.
4. Use `ARTrackedImageManager.trackablesChanged` to monitor for QR code detection events.
5. Use `ARTrackedImage` extension methods `IsQrCode`, `TryGetQrCodeData` and `TryGetQrCodeSize` to get additional information about the QR code and to distinguish between regular images and QR codes. This is applicable only if the XR Reference Image Library also contains regular image targets.
6. Use `SpacesMutableRuntimeReferenceImageLibrary.SetTrackingModeForReferenceImage` to adjust tracking modes at runtime when running on Spaces devices.
7. Use `ARTrackedImageManager.requestedMaxNumberOfMovingImages` to adjust tracking modes at runtime when running on AndroidXR devices. A value of 0 indicates Static tracking mode.

Last Published: Oct 23, 2025

[Previous Topic
Migrate from an earlier Snapdragon Spaces Project](https://docs.qualcomm.com/bundle/publicresource/80-88642-12/topics/migrationguide_SnapdragonSpaces.md) [Next Topic
Migrate from QCHTI to XR Hands and XR Interaction Toolkit](https://docs.qualcomm.com/bundle/publicresource/80-88642-12/topics/migrationguide_QCHTi_XRHands.md)