Giter Club home page Giter Club logo

endtoend-base's Introduction

Android Things End-to-End base sample (Kotlin)

This sample demonstrates integration between an Android Things device, Android companion app, and the Smart Home APIs, using Cloud Firestore for the backend and FCM + Cloud Functions for communication between the components. It can be used as a starting point for building your own Android projects with Assistant / Smarthome integration.

Note: The Android Things Console will be turned down for non-commercial use on January 5, 2022. For more details, see the FAQ page.

Introduction

This sample allows control of an Android Things device with a Rainbow Hat mounted on top. The user can:

  • Tap buttons on the hat to turn LEDs on and off
  • See the LED state from an Android phone (companion app)
  • Control the LED state from the companion app
  • Control the LED state from any Assistant device (phone, Google Home, etc) using smarthome apis -- e.g "Hey google, turn on the red LED on the rainbow hat."
  • Report results back to the main UI thread once that work is complete

IMPORTANT: Please, note that these samples are not necessarily the easiest way to accomplish a task. In particular, they handle all low level I/O protocols directly, on purpose to showcase how to use the Peripheral APIs. In real world applications, you should use or develop a suitable driver that encapsulates the manipulation of low level APIs.

Pre-requisites

Build and install

There are three components to install, each in a subdirectory of this project.

Enable auto-launch behavior

This sample app is currently configured to launch only when deployed from your development machine. To enable the main activity to launch automatically on boot, add the following intent-filter to the app's manifest file:

<activity ...>

    <intent-filter>
        <action android:name="android.intent.action.MAIN"/>
        <category android:name="android.intent.category.HOME"/>
        <category android:name="android.intent.category.DEFAULT"/>
    </intent-filter>

</activity>

endtoend-base's People

Contributors

fleker avatar jdkoren avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.