Welcome to code samples for Android Things. Here you will find code snippets and tutorials to help you build embedded applications and integrate hardware peripherals. You can get started with the following samples:
- Simple PIO - Runs basic code that exercises the PIO APIs in Java. Each sample is an Android module that can be run independently.
- Native PIO - Runs basic code that exercises the PIO APIs in C/C++. Each sample is an Android module that can be run independently.
- Simple UI - Basic user interface that represents each GPIO on the board by an interactive switch widget on the display.
- Button - Using a button input driver from the peripheral driver library to listen for GPIO state changes and generate Android key events.
- UART Loopback - Emulates a loopback adapter for the selected UART port. Echoes all data back out the same port.
- Doorbell - Smart doorbell that captures a camera image, analyzes it, and sends it to a companion app using the Google Cloud Platform and Firebase.
- Weather Station - Integration of multiple peripheral sensors to analyze and display current weather information. Data can optionally push to the Google Cloud Platform for further analysis.
- TensorFlow - This sample demonstrates accessing the camera, performing object recognition and image classification using machine learning, and speaking out the results using text-to-speech (TTS).
- Drivers - Sample peripheral drivers for Android Things. Includes drivers for an OLED screen, GPS, accelerometer, and more.
You can find additional code samples at the Android Things page on GitHub.