Create an Android Things project

Things apps use the same structure as those designed for phones and tablets.
This similarity means you can modify your existing apps to also run on embedded things
or create new apps based on what you already know about building apps for Android.

This lesson describes how to prepare your development environment for Android Things,
and the required changes to enable app to run on embedded things.

Get started

In order to access new APIs for Things, target Android 8.1 (Oreo), API level
27 or higher.

Name the new empty activity HomeActivity.

The new project wizard automatically adds two necessary items to your Android Studio
project: a dependency to the Android Things support library and a
default launch activity.

Added library

Android Things devices expose APIs through support libraries that are not part of
the Android SDK. The new project wizard automatically adds a dependency
to the support library to your app-level build.gradle file:

The wizard adds <uses-library> to your app's manifest file to make this
prebuilt library available to the app's classpath at run time.

Added home activity

An application intending to run on an embedded device must declare an
activity in its manifest as the main entry point after the device boots.
Note that the wizard applies an intent filter containing the following attributes: