Can we test Android Auto in emulators without real device?
Asked Answered
P

2

6

I have followed this link. In the documentation, we can create Android Auto simulator and we need a real device with a USB plug to communicate between them.

The question is can I test without a real device (i.e making adb forward connection between two emulators)?

Palawan answered 23/6, 2016 at 19:53 Comment(3)
I'm currently trying this out.. I'll let you know if I ever find something.Saliferous
You can just install Android Auto in emulatorFajardo
@YogeeshSeralathan, and then what? He might be able to install Android Auto in an emulator with an APK (which I doubt he can find one for the latest version of Android Auto).Saliferous
S
4

The Desktop Head Unit (DHU) https://developer.android.com/training/auto/testing/index.html provides a virtual display that emulates the protocol used for Android Auto. You plug your phone in via a USB cable, and the phone thinks the DHU is a real vehicle display. However, generating the display is a very CPU intensive operation requiring 3D acceleration, and the regular Android emulator is not fast enough for this. So therefore it is not supported.

However, if you want to do automated testing, you may not need to have a real vehicle display connected at all, and could therefore use an Android emulator. Android Auto messaging apps use the regular Notification API, so you could do tests to check the Notifications are created correctly. Android Auto media apps use the standard L media framework, and you could do tests to check for this as well.

Seventeen answered 20/7, 2016 at 0:41 Comment(0)
S
3

So I've been trying this for quite sometime, but unfortunately, this doesn't seem to be possible.

Main reason is there is no available APK for the latest version of the Android Auto companion app to make sideloading in the emulator possible. Where in order to test out the Android Auto DHU, there has to be a companion app running and connected to it.

Saliferous answered 19/7, 2016 at 14:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.