Android Things Emulator

I was wondering if there is a way to configure the emulator in Android Studio using a system image that can be downloaded from the Android Things website. I already have a raspberry Pi 3, but I always have to connect it to the TV, which is not very practical. That is why I ask.

+10
android-emulator android-things
source share
3 answers

You do not need to connect the Raspberry Pi to the TV to work on Android Things. Pi will work without connecting an HDMI cable.

If you want to create a user interface, you can use a regular emulator , and in your AndroidManifest.xml add that the Android Things SDK is not required:

  <application ... > <uses-library android:name="com.google.android.things" android:required="false"/> ... activities etc </application> 

android: required = "false" is the key

You just need to make sure that the code running on the emulator does not use the import of Android Things java applications at that time.


One way to make sure that the Android Things SDK code is stored separately from your main application (which means that you can run the main application on an emulator) is to split the code with a hexagonal architecture, this is not suitable for your question, but it will allow you to avoid the need to have a β€œraspberry pi emulator,” which you can read more about here: https://www.novoda.com/blog/testing-android-things/

+13
source share

In my opinion, this is not possible now. There are too many hardware dependencies at the early stage (GPIO, etc.). If this were possible at this point, the good guys at Google would love to provide some sort of solution for this.

+4
source share

If you just want to view the screen, you can try Vysor , which is a Chrome application that works through adb. If your RPI is connected via adb, it should work. You can get it here: https://www.vysor.io/ .

+4
source share

All Articles