Stay organized with collections
Save and categorize content based on your preferences.
The distant display emulator can be used to emulate the multi-screen hardware
found in some vehicles. Specifically, it emulates a device with a touch-enabled
center screen and a non-touch dashboard screen. One example scenario for such a
setup would be for a user to send a video app to the dashboard screen while
continuing to use the center screen to look up a destination in a navigation
app.
Move apps using the system UI
The primary way that users move apps to and from the distant display is using a
system UI affordance. In the distant display emulator, this can be found in the
status bar at the top of the screen.
is the button
to send the app to the distant display and
is the
button to return it to the main display. If your app is in immersive
mode—that is, it's hidden the system bars—you'll need to reveal the status bar to
show these controls.
Move apps using adb
In addition to the system UI affordance, you can use the following adb commands
to move apps to and from the distant display.
For apps that have integrated with media session,
you can use the following command to control playback. For example, this can be
used to control playback of a video app while it's on the distant display.
adbshellcmdmedia_sessiondispatchCOMMAND
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 2025-02-10 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 2025-02-10 UTC."],[],[],null,["# Test using the distant display emulator\n\nThe distant display emulator can be used to emulate the multi-screen hardware\nfound in some vehicles. Specifically, it emulates a device with a touch-enabled\ncenter screen and a non-touch dashboard screen. One example scenario for such a\nsetup would be for a user to send a video app to the dashboard screen while\ncontinuing to use the center screen to look up a destination in a navigation\napp.\n\nMove apps using the system UI\n-----------------------------\n\nThe primary way that users move apps to and from the distant display is using a\nsystem UI affordance. In the distant display emulator, this can be found in the\nstatus bar at the top of the screen.\nis the button\nto send the app to the distant display and\nis the\nbutton to return it to the main display. If your app is in immersive\nmode---that is, it's hidden the system bars---you'll need to reveal the status bar to\nshow these controls.\n\nMove apps using adb\n-------------------\n\nIn addition to the system UI affordance, you can use the following adb commands\nto move apps to and from the distant display. \n\n user_id=$(adb shell am get-current-user)\n adb shell am broadcast -a com.android.systemui.car.intent.action.MOVE_TASK --user $user_id --es move \"to_dd\"\n adb shell am broadcast -a com.android.systemui.car.intent.action.MOVE_TASK --user $user_id --es move \"from_dd\"\n\nControl media playback using adb\n--------------------------------\n\nFor apps that have [integrated with media session](/media/media3/session/control-playback),\nyou can use the following command to control playback. For example, this can be\nused to control playback of a video app while it's on the distant display. \n\n adb shell cmd media_session dispatch \u003cvar translate=\"no\"\u003eCOMMAND\u003c/var\u003e\n\n| **Tip:** Run `adb shell cmd media_session` to see full usage information."]]