Android Auto now has a desktop emulator as ‘Desktop Head Unit’ for developers who want to develop android app for cars.
Google has announced this news in a blog, “Today we’re releasing the Desktop Head Unit (DHU), a new testing tool for Android Auto developers. The DHU enables your workstation to act as an Android Auto head unit that emulates the in-car experience for testing purposes. Once you’ve installed the DHU, you can test your Android Auto apps by connecting your phone and workstation via USB. Your phone will behave as if it’s connected to a car. Your app is displayed on the workstation, the same as it’s displayed on a car. Now you can test pre-released versions of your app in a production-like environment, without having to work from your car. With the release of the DHU, the previous simulators are deprecated, but will be supported for a short period prior to being officially removed.”
To Quick start, you need an android phone (Lollipop or higher version) with the Android Auto companion app installed. Install the companion app if you haven’t installed it yet. After this, install the DHU on your workstation by opening the SDK Manager and downloading it from Extras > Android Auto Desktop Head Unit emulator. You will notice that DHU will be installed in the <sdk>/extras/google/auto/ directory. Now run DHU.
DHU will allow developers to emulate a car dashboard running Android Auto, which will make the testing process more practical. But for this developer need to connect their phone to a computer via USB, and the mobile device will assume or think that it is connected to a physical car.