Camera support
Stay organized with collections
Save and categorize content based on your preferences.
The emulator supports the use of basic camera functionality on your virtual
device for earlier Android versions. Android 11 and higher supports the
following additional Android Emulator camera capabilities:
- RAW capture
- YUV reprocessing
- Level 3 devices
- Logical camera support
- Emulating sensor orientation by using data from the sensor manager
- Applying video stabilization by reducing handshake frequency
- Applying edge enhancement by removing the upscaling usually done in the YUV
pipeline
- Concurrent cameras
Virtual scene camera and ARCore
You can use the virtual scene camera in a virtual environment to experiment
with augmented reality (AR) apps made with
ARCore.
For information on using the virtual scene camera in the emulator, see
Run AR apps in Android
Emulator.
When using the emulator with a camera app, you can import an image in PNG or
JPEG format to be used within a virtual scene. To choose an image for use in a
virtual scene, open the Extended controls window, select the
Camera > Virtual scene images tab, and click Add image.
This feature can be used to import custom
images such as QR codes for use with any camera-based app. For more information,
see
Add Augmented Images to the scene.
Test common AR actions with macros
You can greatly reduce the time it takes to test common AR actions by using
the preset macros in the emulator. For example, you can use a macro to reset all
the device's sensors to their default state.
Before using macros, follow the steps in Run AR apps in Android
Emulator
to set up the virtual scene camera for your app, run your app on the emulator,
and update ARCore. Then, follow these steps to use emulator macros:
- With the emulator running and your app connected to ARCore, click More
in the emulator panel.
- Select Record and Playback > Macro Playback.
Choose a macro that you want to use, then click Play.
During playback, you can interrupt a macro by clicking Stop.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2023-04-12 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-04-12 UTC."],[],[],null,["# Camera support\n\nThe emulator supports the use of basic camera functionality on your virtual\ndevice for earlier Android versions. Android 11 and higher supports the\nfollowing additional Android Emulator camera capabilities:\n\n- RAW capture\n- YUV reprocessing\n- Level 3 devices\n- Logical camera support\n- Emulating sensor orientation by using data from the sensor manager\n- Applying video stabilization by reducing handshake frequency\n- Applying edge enhancement by removing the upscaling usually done in the YUV pipeline\n- Concurrent cameras\n\nVirtual scene camera and ARCore\n-------------------------------\n\nYou can use the virtual scene camera in a virtual environment to experiment\nwith augmented reality (AR) apps made with\n[ARCore](https://developers.google.com/ar/discover/).\n\nFor information on using the virtual scene camera in the emulator, see\n[Run AR apps in Android\nEmulator](https://developers.google.com/ar/develop/java/emulator).\n\nWhen using the emulator with a camera app, you can import an image in PNG or\nJPEG format to be used within a virtual scene. To choose an image for use in a\nvirtual scene, open the **Extended controls** window, select the\n**Camera \\\u003e Virtual scene images** tab, and click **Add image** .\nThis feature can be used to import custom\nimages such as QR codes for use with any camera-based app. For more information,\nsee\n[Add Augmented Images to the scene](https://developers.google.com/ar/develop/java/emulator#add_augmented_images_to_the_scene).\n\nTest common AR actions with macros\n----------------------------------\n\nYou can greatly reduce the time it takes to test common AR actions by using\nthe preset macros in the emulator. For example, you can use a macro to reset all\nthe device's sensors to their default state.\n\nBefore using macros, follow the steps in [Run AR apps in Android\nEmulator](https://developers.google.com/ar/develop/java/emulator)\nto set up the virtual scene camera for your app, run your app on the emulator,\nand update ARCore. Then, follow these steps to use emulator macros:\n\n1. With the emulator running and your app connected to ARCore, click **More** in the emulator panel.\n2. Select **Record and Playback \\\u003e Macro Playback**.\n3. Choose a macro that you want to use, then click **Play**.\n\n During playback, you can interrupt a macro by clicking **Stop**."]]