Extending this class enables the customization of most elements that pertain to the system bar and the notifications logic. Use this class to update the functionality of the VolumeUI and lockscreen. The Keyguard screen is shown below. A lockscreen with a bouncer is displayed when the user has selected a privacy type with which to unlock the device, as shown below. To learn more, see FullscreenUserSwitcher.
The Loading screen is displayed whenever a User is switched, regardless of the entry point. For example, through the User Picker or the Settings screen.
See Figure 3 above for an example. To set up the Android User, the initial Setup Wizard flow enables the driver to set up a User name for themselves. If the driver then associates the Android User with a Google account, the User name is selected from that account. However, if the driver specifies a name, for instance DriverB, and then later associates that User name to their Google Account with the name of Maddy, the originally assigned name DriverB is not changed because that name was explicitly set.
The driver can change the name on the Settings menu only. For more information, see Customization. While OEMs can provide user interface entry points to switch Users, results can sometimes be undesirable. Should this occur:. The Setup Wizard performs first-time User setup. This, too, can be customized. In some cases, this can be implemented in the background, thereby streamlining the Setup Wizard process. Content and code samples on this page are subject to the licenses described in the Content License.
Docs Getting Started About. Core Topics Architecture. Overview Automotive. Getting Started. Development Tools. Android Virtual Device. Testing Tools and Infrastructure. Displays and Input. Driver Distraction. Users and Accounts. Voice Interaction Integration Guide.
Human Machine Interface. Car Settings Structure. Car UI Library. More Features. Rotary Controller. If the following error dialog is presented on launch, see the Troubleshooting section for workaround instructions:. When you first launch the Android Device Manager, it presents a screen that displays all currently-configured virtual devices. When you select a device in the list, the Start button appears on the right. You can click the Start button to launch the emulator with this virtual device:.
After the emulator starts with the selected virtual device, the Start button changes to a Stop button that you can use to halt the emulator:. To create a new device, click the New button located in the upper right-hand area of the screen :. Give the device a new name.
Select a processor type for this virtual device by clicking the Processor pull-down menu. Selecting x86 will provide the best performance because it enables the emulator to take advantage of hardware acceleration. For example, select Oreo 8. If you select an Android API level that has not yet been installed, the Device Manager will display A new device will be downloaded message at the bottom of the screen — it will download and install the necessary files as it creates the new virtual device:.
Edit any properties that you need to modify. Add any additional properties that you need to explicitly set. The New Device screen lists only the most commonly-modified properties, but you can click the Add Property pull-down menu at the bottom to add additional properties:. You can also define a custom property by selecting Custom You might get a License Acceptance screen. Click Accept if you agree to the license terms:.
The Android Device Manager adds the new device to the list of installed virtual devices while displaying a Creating progress indicator during device creation:. When the creation process is complete, the new device is shown in the list of installed virtual devices with a Start button, ready to launch:.
To edit an existing virtual device, select the device and click the Edit button located in the upper right-hand corner of the screen :. The Device Editor screen lists the properties of the virtual device under the Property column, with the corresponding values of each property in the Value column. When you select a property, a detailed description of that property is displayed on the right. To change a property, edit its value in the Value column. For example, in the following screenshot the hw.
After you have made the necessary configuration changes, click the Save button. For more information about changing virtual device properties, see Editing Android Virtual Device Properties. Additional options for working with devices are available from the Additional Options … pull-down menu in the upper right-hand corner:. Duplicate and Edit — Duplicates the currently-selected device and opens it in the New Device screen with a different unique name. Reveal in Explorer — Opens a Windows Explorer window in the folder that holds the files for the virtual device.
Factory Reset — Resets the selected device to its default settings, erasing any user changes made to the internal state of the device while it was running this also erases the current Quick Boot snapshot, if any. Currently, you can't use the emulator's extended controls when it's running in a tool window. If your development workflow depends heavily on the extended controls, continue to use the Android Emulator as a standalone application.
In addition, certain virtual devices—such as Android TV and foldable devices—can't be run in Android Studio because they have specialized UI requirements or important functions in the extended controls. An APK Installer dialog appears.
When the installation completes, you can view the app in your apps list. To add a file to the emulated device, drag the file onto the emulator screen. You can view the file from Android Studio using the Device File Explorer , or find it from the device using the Downloads or Files app, depending on the device version. A snapshot is a stored image of an AVD Android Virtual Device that preserves the entire state of the device at the time that it was saved — including OS settings, application state, and user data.
You can return to a saved system state by loading a snapshot whenever you choose, saving you the time of waiting for the operating system and applications on the virtual device to restart, as well as saving you the effort of bringing your app back to the state at which you want to resume your testing.
Starting a virtual device by loading a snapshot is much like waking a physical device from a sleep state, as opposed to booting it from a powered-off state. The simplest way to take advantage of snapshots is to use Quick Boot snapshots: By default, each AVD is set to automatically save a Quick Boot snapshot on exit and load from a Quick Boot snapshot on start.
The first time that an AVD starts, it must perform a cold boot , just like powering on a device. If Quick Boot is enabled, all subsequent starts load from the specified snapshot, and the system is restored to the state saved in that snapshot. Snapshots are valid for the system image, AVD configuration, and emulator features with which they are saved. When you make a change in any of these areas, all snapshots of the affected AVD become invalid.
Most controls for saving, loading, and managing snapshots are in the Snapshots and Settings tabs in the Snapshots pane in the emulator's Extended controls window. You can also control the Quick Boot options when starting the emulator from the command line.
When you close an AVD, you can specify whether the emulator automatically saves a snapshot when you close. To control this behavior, proceed as follows:. Use the Auto-save current state to Quickboot drop-down menu to select one of the following options:. Yes : Always save an AVD snapshot when you close the emulator. This is the default. Your selection applies only to the AVD that is currently open.
To save a general snapshot, open the emulator's Extended controls window, select the Snapshots category, and click the Take snapshot button in the lower-right corner of the window. To edit the name and description of the selected snapshot, click the edit button at the bottom of the window. To manually delete a snapshot, open the emulator's Extended controls window, select the Snapshots category, select the snapshot, and click the delete button at the bottom of the window.
You can also specify whether you would like the emulator to automatically delete snapshots when they become invalid, such as when the AVD settings or emulator version change. By default, the emulator will ask you if you'd like for it to delete invalid snapshots.
You can change this setting with the Delete invalid snapshots menu in the Settings tab of the Snapshots pane. To load a snapshot at any time, open the emulator's Extended controls window, select the Snapshots category, choose a snapshot, and click the load button at the bottom of the window. In Android Studio 3. Use your computer mouse pointer to mimic your finger on the touchscreen; select menu items and input fields; and click buttons and controls.
Use your computer keyboard to type characters and enter emulator shortcuts. To perform common actions with the emulator, use the panel on the right side, as described in table 2. You can use keyboard shortcuts to perform many common actions in the emulator. To pan in zoom mode, hold Control Command on Mac while pressing the arrow keys on the keyboard. The screen recording controls are in the Screen record tab of the Extended Controls window.
To begin screen recording, click the Start recording button in the Screen record tab. To stop recording, click Stop recording.
Controls for playing and saving the recorded video are at the bottom of the Screen record tab. You can also record and save a screen recording from the emulator using the following command on the command line:. To take a screenshot of the virtual device, click the Take screenshot button. By default, the screenshot is saved on your computer desktop. To change the location to which screenshots are saved, use the Screenshot save location control in the Settings category in the emulator's Extended controls window.
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:.
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. 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. 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:. Use the extended controls to send data, change device properties, control apps, and more.
To open the Extended controls window, click More in the emulator panel. You can use keyboard shortcuts to perform many of these tasks. The emulator lets you simulate "my location" information: the location where the emulated device is currently located.
For example, if you click My Location in Google Maps and then send a location, the map shows it. Controls for the device's location information are organized under two tabs: Single points and Routes. In the Single points tab, you can use the Google Maps webview to search for points of interest, just as you would when using Google Maps on a phone or in a browser.
When you search for or click on a location in the map, you can save the location by selecting Save point near the bottom of the map. All of your saved locations are listed on the right side of the Extended controls window.
To set the emulators location to the location you have selected on the map, click the Set location button near the bottom right of the Extended controls window.
Similar to the Single points tab, the Routes tab provides a Google Maps webview that you can use to create a route between two or more locations. To create and save a route, do the following:. To simulate the emulator following the route you saved, select the route from the list of Saved routes and click Play route near the bottom right of the Extended controls window. To stop the simulation, click Stop route.
To continuously simulate the emulator following the specified route, enable the switch next to Repeat playback. To change how quickly the emulator follows the specified route, select an option from the Playback speed dropdown. The speed defaults to the Delay value Speed 1X. You can increase the speed by double Speed 2X , triple Speed 3X , and so on. The emulator allows you to deploy your app to multiple displays, which support customizable dimensions and can help you test apps that support multi- window and multi- display.
While a virtual device is running, you can add up to two additional displays as follows:. The emulator lets you simulate various network conditions. You can approximate the network speed for different network protocols, or you can specify Full , which transfers data as quickly as your computer allows. Specifying a network protocol is always slower than Full. You can also specify the voice and data network status, such as roaming.
The defaults are set in the AVD. You can simulate the battery properties of a device to see how your app performs under different conditions. To select a Charge level , use the slider control. If the AVD has the directional pad enabled in the hardware profile, you can use the directional pad controls with the emulator. However, not all devices can support the directional pad; for example, an Android watch.
The buttons simulate the following actions:. This control can simulate 10 different fingerprint scans. You can use it to test fingerprint integration in your app. This feature is disabled for Android 5. This control lets you test your app against changes in device position, orientation, or both. For example, you can simulate gestures such as tilt and rotation. The accelerometer doesn't track the absolute position of the device: it just detects when a change is occurring.
The control simulates the way accelerometer and magnetometer sensors would respond when you move or rotate a real device. You must enable the accelerometer sensor in your AVD to use this control. These values include gravity.
For example, if the device is suspended in outer space, it would experience zero acceleration all of x, y, and z will be 0.
0コメント