Configure and control OTA updates on Android Things
Clone or download
devunwired Add sample metadata.
Bug: 79346240
Signed-off-by: Dave Smith <smithdave@google.com>

Change-Id: I34acb7b45648bff2f44593355f12f2d92ca1ab42
Latest commit 786617d May 18, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.google Add sample metadata. May 18, 2018
app Update to android things sdk 1.0 May 5, 2018
gradle/wrapper Project init Nov 8, 2017
.gitignore Project init Nov 8, 2017
CONTRIBUTING.md Add LICENSE and README. Nov 28, 2017
LICENSE Add LICENSE and README. Nov 28, 2017
README.md Make launch behavior optional. Apr 5, 2018
build.gradle Project init Nov 8, 2017
gradle.properties Project init Nov 8, 2017
gradlew Project init Nov 8, 2017
gradlew.bat Project init Nov 8, 2017
settings.gradle Project init Nov 8, 2017

README.md

Android Things Device Updates Sample

This application demonstrates how to interact with the device update service on Android Things through the UpdateManager API. By default, the system checks for new OTA updates every few hours and applies them automatically. This example shows you how to configure the update policy to allow an app to take more control over the update process and monitor progress.

Pre-requisites

  • Android Things compatible board
  • Android Studio 2.2+

Getting Started

Import the project using Android Studio and deploy it to your device:

  1. Stage a new OTA update for your device using the Android Things Console.
  2. Press the Check Now button on the device to force a manual update check.
  3. The update status is displayed in the UI as the device downloads and verifies the new update.
  4. Press the Reboot Now button to reboot the device and complete the update process.

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>

License

Copyright 2017 The Android Open Source Project, Inc.

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.