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/
Blundell
source share