简体   繁体   中英

Can we test Android Auto in emulators without real device?

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 (ie making adb forward connection between two emulators)?

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM