All Projects → intel-iot-devkit → android-things-samples

intel-iot-devkit / android-things-samples

Licence: other
Samples and projects for platforms running Android Things

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to android-things-samples

apaw
APAW. Arquitectura y Patrones Web. Máster en Ingeniería Web
Stars: ✭ 46 (+100%)
Mutual labels:  upm
Newtonsoft.Json-for-Unity.Converters
Converters of common Unity types for Newtonsoft.Json. Goes hand in hand with jilleJr/Newtonsoft.Json-for-Unity
Stars: ✭ 147 (+539.13%)
Mutual labels:  upm
betca-spring
BETCA (Spring). Back-end con Tecnologías de Código Abierto, versión Java-Spring
Stars: ✭ 27 (+17.39%)
Mutual labels:  upm
BakingSheet
Easy datasheet management for C# and Unity. Supports Excel, Google Sheet, JSON and CSV format.
Stars: ✭ 144 (+526.09%)
Mutual labels:  upm
sensorhub-cloud-iot
Sensor-based data collection device publishing to Cloud IoT Core
Stars: ✭ 73 (+217.39%)
Mutual labels:  android-things
android-things-rc522
Android library to communicate with RFID Module RC522
Stars: ✭ 44 (+91.3%)
Mutual labels:  android-things
unity-now
▲ Vercel Now plugin for Unity. Deploy WebGL builds with ease
Stars: ✭ 21 (-8.7%)
Mutual labels:  upm
unity-rich-text
🌈 Forget about rich text tags pain
Stars: ✭ 14 (-39.13%)
Mutual labels:  upm
com.xrtk.oculus
The Oculus platform components for the XRTK
Stars: ✭ 11 (-52.17%)
Mutual labels:  upm
ThingsCommander
Things Commander System, based on Android Things developer preview 2
Stars: ✭ 13 (-43.48%)
Mutual labels:  android-things
oyster-package-generator
Oyster is a package generator for Unity Package Manager (UPM). It generates a best standards Unity package with automated deployments via CLI. Focus on coding your package instead of deployments, changelogs, ect.
Stars: ✭ 18 (-21.74%)
Mutual labels:  upm
atdocs
Android Things Translation 中文翻译
Stars: ✭ 19 (-17.39%)
Mutual labels:  android-things
Portada-UPM-ETSIINF
Portada para Trabajo de Fin de Grado para la UPM ETSIINF
Stars: ✭ 23 (+0%)
Mutual labels:  upm
androidthings-mqtt-alarm-panel
Android Things Alarm Control Panel for Home Assistant
Stars: ✭ 69 (+200%)
Mutual labels:  android-things
Hairibar.Ragdoll
A package for animating ragdolls through keyframed animations.
Stars: ✭ 66 (+186.96%)
Mutual labels:  upm
Fool
Simple Russian voice assistant based on Android Things and Raspberry Pi 3
Stars: ✭ 26 (+13.04%)
Mutual labels:  android-things
androidthings-weatherstation
Codelab and solution for the Android Things Weatherstation
Stars: ✭ 16 (-30.43%)
Mutual labels:  android-things
sample-uartloopback
Echo received characters over a UART with Android Things
Stars: ✭ 71 (+208.7%)
Mutual labels:  android-things
native-libandroidthings
NDK library for exposing Peripheral I/O APIs in C/C++
Stars: ✭ 28 (+21.74%)
Mutual labels:  android-things
bgTools-playerPrefsEditor
Tool extension for the Unity Editor that enables easy access to the player preferences over a simple UI.
Stars: ✭ 70 (+204.35%)
Mutual labels:  upm

Java Examples for Android Things

The current version of this document assumes you have the Android Things installed on an Intel Joule or Intel Edison device and that you have Android Studio set up (and know how to use it to some extent).

Overview

This is a walk through of how to execute the Android Things code samples on Android Studio. These Applications use UPM and MRAA libraries and run from Android Studio. These examples are a good starting point for developers to write android applications using UPM and MRAA. With these templates developers can extend to multiple sensors. Each sample is an android module that can be run independently.

A README.md file is included in the top level of each of the sample projects. See the project's README.md file for specific requirements for that project.

Importing the code to Android Studio

  1. Clone the project from github (details not provided here).
  2. Select Open Project from android studio and select the andriod-things-sample directory.

Importing UPM Android studio projects

  1. The UPM Sensor library archives maintained on github and distributed via jcenter.

  2. The jcenter link to refer the available UPM library archives/packages is: http://jcenter.bintray.com/io/mraa/at/upm/

  3. The build.gradle at the top level of the android-things-samples project includes the required directive to include the upm modules needed in that project from jcenter. The upm project will pull in the requried mraa dependancy.

    For example, the following dependency line is found in jhd1313m1/build.gradle:

    dependencies {
        compile 'io.mraa.at.upm:upm_jhd1313m1:1.3.0'
        compile project(':driversupport')
        provided 'com.google.android.things:androidthings:0.3-devpreview'
    }
    

    This build script pulls in io.mraa.at.upm:upm_jhd1313m1:1.3.0 from jcenter and includes the driverlibrary from this project as well. Driverlibrary includes some common functions as well as an example sensor manager plug-in for the MMA 7660 Accelerometer.

PreRequisites

  1. Android Studio: Download Android Studio from:

    https://developer.android.com/studio/index.html

  2. SDK: Download the Android Things SDK preview image for your development board from:

    https://developer.android.com/things/preview/index.html

  3. A Development board: You will need a development board such as the Intel Edison or Intel Joule with the Android Things image flashed. See Google's getting started guides for information on flashing your development board.

  4. Sensors and effectors: A grove kit with any required sensors or effectors for the example. See the example's README.md file.

  5. Sensor Libraries on JCenter will be automatically loaded. You will need internet access:

    http://jcenter.bintray.com/io/mraa/at/upm/

Build and Install

You can run your application directly from Android Studio or can build an APK using Android Studio and then side-load it onto your device.

  1. Installing your APK from Android Studio:

    In your project - to the right select : Gradle -> Your Application name -> Install -> installdebug, This does both compiling an application and installing it to the device.

  2. Build apk in Android studio and side-load:

    Build -> Build APK. This generates a .apk (application).The application path in your project is module/build/outputs. adb install <xyz.apk>

  3. Directly run your applicatino from Android Studio: Select the "Run or debug configuration" for the module which needs to be run. Press the Run button or shift+f10.

Start an application without the launcher

The below steps will help you form the adb command to push start your apk:

  1. Install your .apk file adb install .apk

  2. Determine the package name (you probably already know this). adb logcat | grep 'Running dexopt'

10-23 18:02:30.207  2657  2683 I PackageManager.DexOptimizer: Running dexopt (dex2oat)
on: /data/app/vmdl385467157.tmp/base.apk pkg=org.apache.mobilespec isa=x86 vmSafeMode=false
debuggable=true target-filter=interpret-only NOTE the pkg= field: org.apache.mobilespec
  1. Find the startup action and intent adb shell pm dump org.apache.mobilespec | head
Resolver Table: DUMP OF SERVICE package: Activity Resolver Table:
    Non-Data Actions: android.intent.action.MAIN:
    35725ea org.apache.mobilespec/.MainActivity filter c5952c4
     Action: "android.intent.action.MAIN" Category: "android.intent.category.LAUNCHER"
     AutoVerify=false
  1. The launch command for the above is: adb shell command am start -n org.apache.mobilespec/.MainActivity -a android.intent.category.LAUNCHER`

  2. Alternatively, you can use the gradle script: ./gradlew :installDebug adb shell am start com.example.upm.androidthings.driversamples/.

Device connections

See the module's strings.xml file to change the bus or gpio pins being used for your sensors, displays and effectors.

For IO Pinouts on Edison and Joule please check the android-things wiki

Edison Arduino Pinout: https://developer.android.com/things/hardware/edison-arduino-io.html

Joule pinout: https://developer.android.com/things/hardware/joule-io.html

Getting Started Guides for Edison and Joule

Intel's getting started guides for Edison and Joule for Android Things may be found from links on this page:

https://software.intel.com/en-us/iot/android-things

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].