[AndroidThings Tut 0] Getting Started with Android Things
Introduction to Android Things Framework
Android Things allows you to make amazing IoT devices with simple code. It makes developing connected embedded devices easy by providing the same Android development tools, best-in-class Android framework, and Google APIs that make developers successful on mobile. Android Things extends the core Android framework with additional APIs provided by the Things Support Library.
Building Your First Android Things Device
Prerequisite
Before you begin building apps for Things, you must:
- Update your SDK tools to version 25.0.3 or higher The updated SDK tools enable you to build and test apps for Things.
- Update your SDK with Android 8.0 (Oreo), API 26 or higher The updated platform version provides new APIs for Things apps
Create Android Things Project
Choose The Form Factor and Minimum SDK
Add AndroidThings Empty Activity
Configure Activity and finish
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.
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
- Action: ACTION_MAIN
- Category: CATEGORY_DEFAULT
- Category:
IOT_LAUNCHER
For ease of development, this same activity includes a CATEGORY_LAUNCHER intent filter so Android Studio can launch it as the default activity when deploying or debugging.
Please Clap 👏👏👏 few times if you find this useful, so more people can see it! Asante!