From 0238bf248095682b870732432095a987ee558aa2 Mon Sep 17 00:00:00 2001
From: Rich Slogar The Desktop Head Unit (DHU) enables your development machine to emulate an Android Auto
+head unit, so you can easily run and test Android Auto apps. The DHU runs on
+Windows, Mac, and Linux hosts and replaces previous Android Auto simulators,
+such as the Android Media Browser and Messaging
+simulators. Note: For other information about testing Auto apps, see the
+training lesson
+Run and Test Auto Apps.
+ To launch the DHU, run the
+ By default, the DHU emulates the most common form of Android Auto-compatible
+ head unit, which uses a touch screen user interface. You can simulate user
+ touches by clicking the DHU with a mouse. To emulate head units which use
+ a rotary controller for input, you can use the
+ When the DHU is in rotary-controller mode you can simulate controller
+ operations by using keyboard shortcuts, as described in DHU commands and key bindings. If the DHU is in rotary
+ controller mode, it ignores mouse clicks; you must operate Android Auto with
+ the simulated rotary controller operations.
+
+ DHU commands allow you to test your app with Android Auto features, such as
+ playing voice input or switching between night and day display mode. You can issue commands to
+ the DHU by running commands from the terminal window where you launched DHU.
+ You can also issue commands by selecting the DHU window and
+ using keyboard shortcuts. The DHU commands
+ and key bindings for all controls are listed in DHU
+ commands and key bindings.
+
+ Android Auto supports different color schemes for day and night. You should test your app in both
+ day and night mode. You can switch between night and day mode in either of the
+ following ways:
+ The DHU supports using a microphone for voice input. You can also instruct the DHU to treat
+a pre-recorded voice track as input, as if the DHU had heard the track through the microphone. To use a pre-recorded sound file as input, enter this command: For your convenience, we have provided the following sound files for common
+voice commands. These sound files are installed in the
+ The DHU supports the following commands. Important: Use of the Android Media Browser and Messaging
+Simulators for testing Android Auto apps is deprecated. Instead, we recommend using the
+Desktop Head Unit, which enables your development machine to act as if it were an Android Auto head
+unit. To get the simulators, open the
+SDK Manager and download
+them from Extras > Android Auto API Simulators. Before you begin testing, compile your app in your development environment.
+Install your app and the Android simulator for the features you want to test
+(that is, audio or messaging) on a physical or virtual device running Android
+5.0 (API level 21) or higher. To check the version of Android on the device, go
+to Settings > About phone (or About tablet)
+> Android Version. To run and test audio apps: To run and test messaging apps:In this document
+
+
+ See also
+
+
+Launching the DHU
+
+desktop-head-unit.exe
(on Windows)
+ or desktop-head-unit
(on Mac or Linux) command, as described in
+ Connecting
+ the DHU to your mobile device.
+-i controller
flag,
+ as in this example:
+$ ./desktop-head-unit -i controller
+
+Issuing DHU Commands
+
+Switching between day and night mode
+
+
+
+
+daynight
in the terminal where you launched the DHU.
+ Microphone testing
+
+
+$ mic play <sound_file_path>/<sound_file>.wav
+
+
+<sdk>/extras/google/auto/voice/
directory.
+
+exitnav.wav
+ navgoogle.wav
+ navsoh.wav
+ nextturn.wav
+ showalternateroute.wav
+ howlong.wav
+ navhome.wav
+ navwork.wav
+ pause.wav
+ showtraffic.wav
+ DHU commands and key bindings
+
+
+
+
+
+
+
+
+
+
+
+
+Category
+ Command
+ Subcommand
+ Argument(s)
+ Keyboard Shortcut(s)
+ Description
+
+
+
+System
+help
+
+ [command]
+
+ Shows the full command set. Specifying a command name (for example,
+help day
)
+ causes the system to show help for that command.
+
+
+
+quit
+
+
+ Alt+q
+Quits the head unit.
+
+
+
+
+sleep
+
+ [seconds]
+
+ Sleeps for one second. Specifying an argument (for example,
+sleep 30
) causes the
+system to sleep the specified number of seconds. This command
+is useful if you are writing scripts for the DHU. (You can run a script by using I/O redirection
+from the command line: ./desktop-head-unit < script.txt
loads commands from the
+file script.txt
.)
+
+
+
+
+
+
+screenshot
+
+ filename.png
+
+ Saves a screenshot to
+filename.png
.
+
+
+Microphone
+mic
+begin
+
+ m
+Activates the microphone (equivalent to clicking the steering wheel's microphone button) and
+waits for input from the computer microphone.
+
+
+
+
+
+play
+filename.wav
+
+ Causes the DHU to treat
+filename.wav
as voice input, as if it had heard that sound
+ through the microphone. You do not hear the sound file being played, but you do hear
+ the response from Android Auto.
+
+
+
+
+
+
+repeat
+
+
+ Repeats the last
+mic play
command, as if you had called mic play
+ again with the same sound file parameter.
+
+
+Input
+dpad
+up
+
down
left
right
+ Arrow keys
+Simulates moving the rotary controller.
+
+
+
+
+
+soft left
+
soft right
+ Shift+Arrow keys
+Simulates pressing the side buttons available on some rotary controllers.
+
+
+
+
+
+click
+
+ Return
+Simulates pressing the rotary controller.
+
+
+
+
+
+back
+
+ Backspace
+Simulates pressing the back button available below some rotary
+ controllers.
+
+
+
+
+
+rotate left
+
rotate right
+ 1
+
2Simulates rotating the rotary controller left (counter-clockwise) or right (clockwise).
+
+
+
+
+
+flick left
+
flick right
+ Shift+1
+
Shift+2Simulates a fast spin of the rotary controller to the left (counter-clockwise) or right
+ (clockwise).
+
+
+
+
+
+
+
+tap
+
+ x y
+
+ Simulates a touch event at the specified coordinates. For example,
+tap 50 100
+
+
+Day/Night
+day
+
+
+ Shift+n
+Activates day mode (high brightness, full color).
+
+
+
+
+night
+
+
+Ctrl+n
+Activates night mode (low brightness, high contrast).
+
+
+
+
+daynight
+
+
+ n
+Toggles current day/night mode.
+Media Browser and Messaging Simulators
+
+Testing audio apps
+
+
+
+
+Testing messaging apps
+
+
+
+
+
+
diff --git a/docs/html/tools/tools_toc.cs b/docs/html/tools/tools_toc.cs
index db19d4f..72f9f21 100644
--- a/docs/html/tools/tools_toc.cs
+++ b/docs/html/tools/tools_toc.cs
@@ -160,6 +160,7 @@ class="en">Tools Help
+
+You should also read
@@ -149,57 +149,124 @@ requirements, you can reduce the effort for building and testing your app. For
more information, see
Auto App Quality.
As you prepare to publish your app, make sure that your app looks correct -when projected on the Auto user interface. Use the Android Media Browser -simulator and Android Messaging simulators to view and test your audio or -messaging apps in a screen that looks similar to what is projected on Auto.
-To get the simulators, open the -SDK Manager and download -them from Extras > Android Auto API Simulators.
+Before you begin testing, compile your app in your development environment. -Install your app and the Android simulator for the features you want to test -(that is, audio or messaging) on a physical or virtual device running Android -5.0 (API level 21) or higher. To check the version of Android on the device, go -to Settings > About > Android Version.
++ As you develop, you can run and test your app on your development machine + using the Desktop Head Unit (DHU). The DHU replaces the existing + simulators and enables your development machine to simulate a vehicle + dashboard system running Android Auto. +
-To run and test audio apps:
+<sdk>/extras/google/auto/
+ directory.+$ sudo apt-get install libsdl2-2.0-0 libsdl2-ttf-2.0-0 libportaudio2 libpng12-0 ++ +
To run and test messaging apps:
+Run the DHU by connecting your mobile device to a development machine and setting up a connection to + the head unit server over Android Debug Bridge + (ADB). Follow these steps to set up tunneling and start the DHU:
On the device, a foreground service appears in the notification area.
+$ adb forward tcp:5277 tcp:5277+
desktop-head-unit.exe
(on Windows)
+ or ./desktop-head-unit
(on Mac or Linux) from the
+ <sdk>/extras/google/auto/
directory.
+
+$ cd <sdk>/extras/google/auto +$ ./desktop-head-unit+ +
+ By default, the head unit server connects over port 5277. To override the host or port
+ (for example, to forward over SSH), use the --adb
flag.
+
+ After you set up and start the DHU, you can run DHU commands from the command line to run and + test your app from the terminal. You can also run these commands by using keyboard shortcuts. For + more information about DHU configuration and commands, see Desktop Head Unit. +
+ + -- cgit v1.1