SlideShare une entreprise Scribd logo
1  sur  44
Télécharger pour lire hors ligne
Android Things,
from mobile apps to physical world
Stefano Sanna
ROME - APRIL 13/14 2018
Giovanni Di Gialluca
OUTLINE
• Android State Of The Nation and (quick) history
• Android Things in one slide
• Hardware and software: board and firmware
• Environment: who’s in, who’s out
• Hello Android Things!
• Setup of a project
• Overview of Android Things API
• Merging Mobile & IoT
• Vision and greetings
overview
Android: State of the Nation
Fall 2007: Android is announced!
Fall 2008: T-Mobile G1 lands in the US
2011: Honeycomb on Motorola Xoom
2014: Android Wear and Android TV
2015: Android Auto
2016: Android Things (DP)
Android Things in one slide
Physical
World
Cloud
Well-known stack
Environment
• Same architecture
• Same IDE (Android Studio)
• Same programming languages
• Same framework
• Same app (Activity) lifecycle
• Same UI widgets (UI?)
• Same application packaging
• Same reliable security for apps and firmware upgrade
• Same passionate community
Android vs Android Things: IN & OUT
Cast
Drive
Firebase Analytics
Firebase Cloud Messaging
Firebase Realtime Database
Firebase Remote Config
Firebase Storage
Fit
Instance ID
Location
Nearby
Places
Mobile Vision
CalendarContract
ContactsContract
DocumentsContract
DownloadManager
MediaStore
Settings
Telephony
UserDictionary
VoicemailContract
AdMob
Android Pay
Firebase Authentication, Links, Invites…
Maps
Play Games
Search
Sign-In
SOM: Fast Prototyping to production
Supported board
NXP Pico i.MX7D NXP Pico i.MX6UL Raspberry Pi3 Model B
PRICE $64 $43 $22
SDK PRICE $79 $69 $22
CPU 1 GHz dual-core ARM 500Mhz ARM 1.2GHz quad-core ARM
RAM 512MB 512MB 1GB
STORAGE 4GB eMMC 4GB eMMC microSD
GPU NO NO Videocore
CAMERA CSI-2 NO CSI-2
AUDIO Analog Analog USB 2.0 + Analog
NET Ethernet, WiFi ac, BT 4.1 Ethernet, WiFi n, BT 4.1 Ethernet, WiFi n, BT 4.1
USB USB 2.0 HOST + 2x OTG 2x USB 2.0 OTG 4x USB 2.0 HOST
GPIO 7x UART, 4x I2C, 4x SPI, 2x
CAN, misc GPIO
8x UART, 4x I2C, 4x SPI, misc 48
GPIO
2x UART, 2x I2C, 2x SPI, up to 26
GPIO
Raspberry Pi3 Model B
• Damn cheap!
• Good performances.
• Ethernet + WiFi
• HDMI + Camera
• Lot of extension boards and kits: AI+VR+IoT!
• You’ll never brick it: different configurations can be tested
just swapping the SD. No eMMC.
• Warning: no ADB via USB, a network is strictly required
firmware
Console: Models
Console: Build (bundle)
Console: Build (AT version)
Console: Build (AT version)
Device updates
An UpdateManager utility
class provides a easy way
for the Android Things
board to check if there is a
new update
Device updates
Using the Console, you can easily create new product
releases based on new Android Things versions or new app
versions or both and push them to devices already deployed
hello_things
Hello_things
app/module build.gradle
dependencies {
…
compileOnly 'com.google.android.things:androidthings:+'
}
AndroidManifest.xml
<uses-permission
android:name="com.google.android.things.permission.USE_PERIPHERAL_IO" />
<application>
<uses-library android:name="com.google.android.things" />
<activity android:name=".MainActivity">
<intent-filter>
<!-- Main & Launcher for Android Studio -->
</intent-filter>
<!-- Launch activity automatically on boot -->
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.IOT_LAUNCHER" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
PeripheralManager service = PeripheralManager.getInstance();
Log.d("GPIO", service.getGpioList().toString());
Gpio mLedGpio = service.openGpio("BCM26");
mLedGpio.setDirection(Gpio.DIRECTION_OUT_INITIALLY_LOW);
new Thread(new Runnable() {
public void run() {
for (int i = 0; i < 10; i++) {
try {
mLedGpio.setValue(i % 2 == 0);
Thread.sleep(250);
} catch (Exception e) {/*uh!uh!*/}
}
}
}).start();
}
}
Hello_things
Anode
(longer pin)
330
Ohm
Things support library
Things Support Library
GPIO
PWM
I2C
SPI
I2S
Single-PIN analog/digital I/O
Serial
UART
Pulse-Width-Modulation to control servo
Slow serial bus for sensors
Fast serial bus for boards interconnection
Point-to-Point serial port
Serial bus for audio streaming
Driver Library
From Hardware specs to interface
• By Google
https://github.com/androidthings/contrib-drivers
• By Intel
https://github.com/intel-iot-devkit/android-things-samples
• By us
https://github.com/giovannidg/androidthingsdrivers
https://github.com/gerdavax/BrickPi3_AndroidThings
Change settings programmatically
• ScreenManager
• Brightness,
• Orientation
• TimeManager
• Time format
• Time zone
• Time auto update
• DeviceManager
• Factory reset
• Set system locales
• Reboot
adb shell reboot –p
unplug the power cord is not polite
User Driver
INPUT
SENSOR
GPS
User Driver
AUDIO
Open Source
GPIO
PWM
I2C
SPI
I2S
Serial
UART
Peripheral
Driver
Library
Code Reuse &
Integration
Project structure
Mobile
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
......
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
boolean managed = MyKeyCodes.manageKeyCode(keyCode);
if (managed) return true;
return super.onKeyDown(keyCode, event);
}
}
keycodelib
public class MyKeyCodes {
public static final int VOLUME_UP_KEY = KeyEvent.KEYCODE_VOLUME_UP;
/**
* @param keyCode
* @return true if the event was managed
*/
public static boolean manageKeyCode(int keyCode) {
if (keyCode == VOLUME_UP_KEY) {
Log.d("KEY_LOG", “Ring the bell");
return true; // indicate we handled the event
}
return false;
}
}
Things
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
try {
mInputDriver = new ButtonInputDriver("BCM4",
Button.LogicState.PRESSED_WHEN_LOW,
MyKeyCodes.VOLUME_UP_KEY// the keycode to send
);
mInputDriver.register();
} catch (IOException e) { } // error configuring button...
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
boolean managed = MyKeyCodes.manageKeyCode(keyCode);
if (managed) return true;
return super.onKeyDown(keyCode, event);
}
to infinity and beyond
Tensor Flow
OpenSource library for Machine Learning
§ Developed by Google,
Available For every OS
§ a computational graph is a series of
tensorflow operation (nodes), each EDGE is
a multidimensional data called Tensor
§ Public neural network pre-trained with one
million of images, or you can train your
neural Network with a provided pythOn
library
§ Neural network model for image
recognition called “Inception“ with 1000
categories
BrikPi + Tensorflow
§ SPI to control
motors and sensors
§ TensorFlow for
object recognition
BrikPi
Raspberry Pi3 extension module with:
§ 4 Mindstorms NXT/EV3 Motor ports
§ 4 Mindstorms NXT/EV3 Sensor ports
§ Extra I2C sensor bus
§ SPI interface to Raspberry Pi3
§ Uniform request/response binary protocol
§ Seamless power management (internal, external, both)
Video please!
Android Things
Giovanni Di Gialluca
giovanni.digialluca@gmail.com
https://github.com/giovannidg
www.linkedin.com/in/giovanni-di-gialluca
Stefano «gerdavax» Sanna
gerdavax@gmail.com
@gerdavax
https://www.linkedin.com/in/gerdavax
Grazie :-

Contenu connexe

Tendances

Hack the Real World with ANDROID THINGS
Hack the Real World with ANDROID THINGSHack the Real World with ANDROID THINGS
Hack the Real World with ANDROID THINGSDevFest DC
 
Myths of Angular 2: What Angular Really Is
Myths of Angular 2: What Angular Really IsMyths of Angular 2: What Angular Really Is
Myths of Angular 2: What Angular Really IsDevFest DC
 
Go Green - Save Power
Go Green - Save PowerGo Green - Save Power
Go Green - Save PowerRajesh Sola
 
Intel ndk - a few Benchmarks
Intel ndk - a few BenchmarksIntel ndk - a few Benchmarks
Intel ndk - a few Benchmarksfirenze-gtug
 
Android on IA devices and Intel Tools
Android on IA devices and Intel ToolsAndroid on IA devices and Intel Tools
Android on IA devices and Intel ToolsXavier Hallade
 
Android Open Accessory Protocol - Turn Your Linux machine as ADK
Android Open Accessory Protocol - Turn Your Linux machine as ADKAndroid Open Accessory Protocol - Turn Your Linux machine as ADK
Android Open Accessory Protocol - Turn Your Linux machine as ADKRajesh Sola
 
Intel Graphics Performance Analyzers (Intel GPA)
Intel Graphics Performance Analyzers (Intel GPA)Intel Graphics Performance Analyzers (Intel GPA)
Intel Graphics Performance Analyzers (Intel GPA)Intel® Software
 
Introduction to Android - Mobile Fest Singapore 2009
Introduction to Android - Mobile Fest Singapore 2009Introduction to Android - Mobile Fest Singapore 2009
Introduction to Android - Mobile Fest Singapore 2009sullis
 
Kinect installation guide
Kinect installation guideKinect installation guide
Kinect installation guidegilmsdn
 
Kubernetes based connected vehicle platform #k8sjp_t1 #k8sjp
Kubernetes based connected vehicle platform #k8sjp_t1 #k8sjp Kubernetes based connected vehicle platform #k8sjp_t1 #k8sjp
Kubernetes based connected vehicle platform #k8sjp_t1 #k8sjp Kenta Suzuki
 
Kinect on Android Pandaboard
Kinect on Android PandaboardKinect on Android Pandaboard
Kinect on Android Pandaboardumituzun84
 
Samsung Indonesia: Tizen Platform Overview and IoT
Samsung Indonesia: Tizen Platform Overview and IoTSamsung Indonesia: Tizen Platform Overview and IoT
Samsung Indonesia: Tizen Platform Overview and IoTRyo Jin
 
Bringing the Real World Into the Game World
Bringing the Real World Into the Game WorldBringing the Real World Into the Game World
Bringing the Real World Into the Game WorldIntel® Software
 
ABS 2014 - The Growth of Android in Embedded Systems
ABS 2014 - The Growth of Android in Embedded SystemsABS 2014 - The Growth of Android in Embedded Systems
ABS 2014 - The Growth of Android in Embedded SystemsBenjamin Zores
 
android mario project
android mario projectandroid mario project
android mario projectkanika kapoor
 
Iot world 2018 presentation
Iot world 2018 presentationIot world 2018 presentation
Iot world 2018 presentationNicola La Gloria
 
Creating Touchless HMIs Using Computer Vision for Gesture Interaction
Creating Touchless HMIs Using Computer Vision for Gesture InteractionCreating Touchless HMIs Using Computer Vision for Gesture Interaction
Creating Touchless HMIs Using Computer Vision for Gesture InteractionICS
 
OWF12/PAUG Conf Days Alternative to google's android emulator, daniel fages, ...
OWF12/PAUG Conf Days Alternative to google's android emulator, daniel fages, ...OWF12/PAUG Conf Days Alternative to google's android emulator, daniel fages, ...
OWF12/PAUG Conf Days Alternative to google's android emulator, daniel fages, ...Paris Open Source Summit
 

Tendances (18)

Hack the Real World with ANDROID THINGS
Hack the Real World with ANDROID THINGSHack the Real World with ANDROID THINGS
Hack the Real World with ANDROID THINGS
 
Myths of Angular 2: What Angular Really Is
Myths of Angular 2: What Angular Really IsMyths of Angular 2: What Angular Really Is
Myths of Angular 2: What Angular Really Is
 
Go Green - Save Power
Go Green - Save PowerGo Green - Save Power
Go Green - Save Power
 
Intel ndk - a few Benchmarks
Intel ndk - a few BenchmarksIntel ndk - a few Benchmarks
Intel ndk - a few Benchmarks
 
Android on IA devices and Intel Tools
Android on IA devices and Intel ToolsAndroid on IA devices and Intel Tools
Android on IA devices and Intel Tools
 
Android Open Accessory Protocol - Turn Your Linux machine as ADK
Android Open Accessory Protocol - Turn Your Linux machine as ADKAndroid Open Accessory Protocol - Turn Your Linux machine as ADK
Android Open Accessory Protocol - Turn Your Linux machine as ADK
 
Intel Graphics Performance Analyzers (Intel GPA)
Intel Graphics Performance Analyzers (Intel GPA)Intel Graphics Performance Analyzers (Intel GPA)
Intel Graphics Performance Analyzers (Intel GPA)
 
Introduction to Android - Mobile Fest Singapore 2009
Introduction to Android - Mobile Fest Singapore 2009Introduction to Android - Mobile Fest Singapore 2009
Introduction to Android - Mobile Fest Singapore 2009
 
Kinect installation guide
Kinect installation guideKinect installation guide
Kinect installation guide
 
Kubernetes based connected vehicle platform #k8sjp_t1 #k8sjp
Kubernetes based connected vehicle platform #k8sjp_t1 #k8sjp Kubernetes based connected vehicle platform #k8sjp_t1 #k8sjp
Kubernetes based connected vehicle platform #k8sjp_t1 #k8sjp
 
Kinect on Android Pandaboard
Kinect on Android PandaboardKinect on Android Pandaboard
Kinect on Android Pandaboard
 
Samsung Indonesia: Tizen Platform Overview and IoT
Samsung Indonesia: Tizen Platform Overview and IoTSamsung Indonesia: Tizen Platform Overview and IoT
Samsung Indonesia: Tizen Platform Overview and IoT
 
Bringing the Real World Into the Game World
Bringing the Real World Into the Game WorldBringing the Real World Into the Game World
Bringing the Real World Into the Game World
 
ABS 2014 - The Growth of Android in Embedded Systems
ABS 2014 - The Growth of Android in Embedded SystemsABS 2014 - The Growth of Android in Embedded Systems
ABS 2014 - The Growth of Android in Embedded Systems
 
android mario project
android mario projectandroid mario project
android mario project
 
Iot world 2018 presentation
Iot world 2018 presentationIot world 2018 presentation
Iot world 2018 presentation
 
Creating Touchless HMIs Using Computer Vision for Gesture Interaction
Creating Touchless HMIs Using Computer Vision for Gesture InteractionCreating Touchless HMIs Using Computer Vision for Gesture Interaction
Creating Touchless HMIs Using Computer Vision for Gesture Interaction
 
OWF12/PAUG Conf Days Alternative to google's android emulator, daniel fages, ...
OWF12/PAUG Conf Days Alternative to google's android emulator, daniel fages, ...OWF12/PAUG Conf Days Alternative to google's android emulator, daniel fages, ...
OWF12/PAUG Conf Days Alternative to google's android emulator, daniel fages, ...
 

Similaire à Android Things, from mobile apps to physical world

KSS Session and Tech Talk-2019 on IOT.pptx
KSS Session and Tech Talk-2019 on IOT.pptxKSS Session and Tech Talk-2019 on IOT.pptx
KSS Session and Tech Talk-2019 on IOT.pptxNashet Ali
 
[HES2013] Hacking apple accessories to pown iDevices – Wake up Neo! Your phon...
[HES2013] Hacking apple accessories to pown iDevices – Wake up Neo! Your phon...[HES2013] Hacking apple accessories to pown iDevices – Wake up Neo! Your phon...
[HES2013] Hacking apple accessories to pown iDevices – Wake up Neo! Your phon...Hackito Ergo Sum
 
.Net Gadgeteer
.Net Gadgeteer .Net Gadgeteer
.Net Gadgeteer Wade Zhu
 
Droidcon uk2012 androvm
Droidcon uk2012 androvmDroidcon uk2012 androvm
Droidcon uk2012 androvmdfages
 
Mobile application and Game development
Mobile application and Game developmentMobile application and Game development
Mobile application and Game developmentWomen In Digital
 
Android Meetup, Илья Лёвин
Android Meetup, Илья ЛёвинAndroid Meetup, Илья Лёвин
Android Meetup, Илья ЛёвинGDG Saint Petersburg
 
[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TV
[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TV[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TV
[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TVBeMyApp
 
Developing for Android TV and the Nexus player - Mihai Risca & Alexander Wegg...
Developing for Android TV and the Nexus player - Mihai Risca & Alexander Wegg...Developing for Android TV and the Nexus player - Mihai Risca & Alexander Wegg...
Developing for Android TV and the Nexus player - Mihai Risca & Alexander Wegg...Codemotion Tel Aviv
 
An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To Androidnatdefreitas
 
"JavaME + Android in action" CCT-CEJUG Dezembro 2008
"JavaME + Android in action" CCT-CEJUG Dezembro 2008"JavaME + Android in action" CCT-CEJUG Dezembro 2008
"JavaME + Android in action" CCT-CEJUG Dezembro 2008Vando Batista
 
Programming objects with android
Programming objects with androidProgramming objects with android
Programming objects with androidfirenze-gtug
 
Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009sullis
 
Introduction to Android - Mobile Portland
Introduction to Android - Mobile PortlandIntroduction to Android - Mobile Portland
Introduction to Android - Mobile Portlandsullis
 
android_project
android_projectandroid_project
android_projectAdit Ghosh
 
Extending your apps to wearables - DroidCon Paris 2014
Extending your apps to wearables -  DroidCon Paris 2014Extending your apps to wearables -  DroidCon Paris 2014
Extending your apps to wearables - DroidCon Paris 2014Paris Android User Group
 
Manish Chasta - Securing Android Applications
Manish Chasta - Securing Android ApplicationsManish Chasta - Securing Android Applications
Manish Chasta - Securing Android ApplicationsPositive Hack Days
 
IoT Getting Started with Intel® IoT Devkit
IoT Getting Started with Intel® IoT DevkitIoT Getting Started with Intel® IoT Devkit
IoT Getting Started with Intel® IoT DevkitVasily Ryzhonkov
 
Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Codemotion
 
AISEC 12 april 2012 Introduction to Windows Embedded Handheld programming
AISEC 12 april 2012   Introduction to Windows Embedded Handheld programmingAISEC 12 april 2012   Introduction to Windows Embedded Handheld programming
AISEC 12 april 2012 Introduction to Windows Embedded Handheld programmingCatalin Gheorghiu
 

Similaire à Android Things, from mobile apps to physical world (20)

KSS Session and Tech Talk-2019 on IOT.pptx
KSS Session and Tech Talk-2019 on IOT.pptxKSS Session and Tech Talk-2019 on IOT.pptx
KSS Session and Tech Talk-2019 on IOT.pptx
 
[HES2013] Hacking apple accessories to pown iDevices – Wake up Neo! Your phon...
[HES2013] Hacking apple accessories to pown iDevices – Wake up Neo! Your phon...[HES2013] Hacking apple accessories to pown iDevices – Wake up Neo! Your phon...
[HES2013] Hacking apple accessories to pown iDevices – Wake up Neo! Your phon...
 
.Net Gadgeteer
.Net Gadgeteer .Net Gadgeteer
.Net Gadgeteer
 
Droidcon uk2012 androvm
Droidcon uk2012 androvmDroidcon uk2012 androvm
Droidcon uk2012 androvm
 
Mobile application and Game development
Mobile application and Game developmentMobile application and Game development
Mobile application and Game development
 
Android Meetup, Илья Лёвин
Android Meetup, Илья ЛёвинAndroid Meetup, Илья Лёвин
Android Meetup, Илья Лёвин
 
[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TV
[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TV[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TV
[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TV
 
Developing for Android TV and the Nexus player - Mihai Risca & Alexander Wegg...
Developing for Android TV and the Nexus player - Mihai Risca & Alexander Wegg...Developing for Android TV and the Nexus player - Mihai Risca & Alexander Wegg...
Developing for Android TV and the Nexus player - Mihai Risca & Alexander Wegg...
 
An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To Android
 
"JavaME + Android in action" CCT-CEJUG Dezembro 2008
"JavaME + Android in action" CCT-CEJUG Dezembro 2008"JavaME + Android in action" CCT-CEJUG Dezembro 2008
"JavaME + Android in action" CCT-CEJUG Dezembro 2008
 
Programming objects with android
Programming objects with androidProgramming objects with android
Programming objects with android
 
Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009
 
Introduction to Android - Mobile Portland
Introduction to Android - Mobile PortlandIntroduction to Android - Mobile Portland
Introduction to Android - Mobile Portland
 
android_project
android_projectandroid_project
android_project
 
Android class provider in mumbai
Android class provider in mumbaiAndroid class provider in mumbai
Android class provider in mumbai
 
Extending your apps to wearables - DroidCon Paris 2014
Extending your apps to wearables -  DroidCon Paris 2014Extending your apps to wearables -  DroidCon Paris 2014
Extending your apps to wearables - DroidCon Paris 2014
 
Manish Chasta - Securing Android Applications
Manish Chasta - Securing Android ApplicationsManish Chasta - Securing Android Applications
Manish Chasta - Securing Android Applications
 
IoT Getting Started with Intel® IoT Devkit
IoT Getting Started with Intel® IoT DevkitIoT Getting Started with Intel® IoT Devkit
IoT Getting Started with Intel® IoT Devkit
 
Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!
 
AISEC 12 april 2012 Introduction to Windows Embedded Handheld programming
AISEC 12 april 2012   Introduction to Windows Embedded Handheld programmingAISEC 12 april 2012   Introduction to Windows Embedded Handheld programming
AISEC 12 april 2012 Introduction to Windows Embedded Handheld programming
 

Plus de Stefano Sanna

Mobile Security su Android - LinuxDay 2018
Mobile Security su Android - LinuxDay 2018Mobile Security su Android - LinuxDay 2018
Mobile Security su Android - LinuxDay 2018Stefano Sanna
 
Android Things in action
Android Things in actionAndroid Things in action
Android Things in actionStefano Sanna
 
Introduzione alla tecnologia iBeacon
Introduzione alla tecnologia iBeaconIntroduzione alla tecnologia iBeacon
Introduzione alla tecnologia iBeaconStefano Sanna
 
Augmented Smartphone
Augmented SmartphoneAugmented Smartphone
Augmented SmartphoneStefano Sanna
 
Bluetooth Low Energy
Bluetooth Low EnergyBluetooth Low Energy
Bluetooth Low EnergyStefano Sanna
 
Google TV: la nuova frontiera Android
Google TV: la nuova frontiera AndroidGoogle TV: la nuova frontiera Android
Google TV: la nuova frontiera AndroidStefano Sanna
 
Enlarge your screen: introducing the Google TV
Enlarge your screen: introducing the Google TVEnlarge your screen: introducing the Google TV
Enlarge your screen: introducing the Google TVStefano Sanna
 
NFC: tecnologia e applicazioni
NFC: tecnologia e applicazioniNFC: tecnologia e applicazioni
NFC: tecnologia e applicazioniStefano Sanna
 
Android - Programmazione Avanzata
Android -  Programmazione AvanzataAndroid -  Programmazione Avanzata
Android - Programmazione AvanzataStefano Sanna
 
HCIM08 - Mobile Applications
HCIM08 - Mobile ApplicationsHCIM08 - Mobile Applications
HCIM08 - Mobile ApplicationsStefano Sanna
 
Android & Bluetooth: hacking e applicazioni
Android & Bluetooth: hacking e applicazioniAndroid & Bluetooth: hacking e applicazioni
Android & Bluetooth: hacking e applicazioniStefano Sanna
 
Application Store: opportunita' e trappole
Application Store: opportunita' e trappoleApplication Store: opportunita' e trappole
Application Store: opportunita' e trappoleStefano Sanna
 
Android Bluetooth Hacking
Android Bluetooth HackingAndroid Bluetooth Hacking
Android Bluetooth HackingStefano Sanna
 
Free Software e Open Hardware
Free Software e Open HardwareFree Software e Open Hardware
Free Software e Open HardwareStefano Sanna
 
Playing with Mobile 2.0
Playing with Mobile 2.0Playing with Mobile 2.0
Playing with Mobile 2.0Stefano Sanna
 
Comunicazione Pervasiva
Comunicazione PervasivaComunicazione Pervasiva
Comunicazione PervasivaStefano Sanna
 
Introduzione alla tecnologia Sun SPOT
Introduzione alla tecnologia Sun SPOTIntroduzione alla tecnologia Sun SPOT
Introduzione alla tecnologia Sun SPOTStefano Sanna
 

Plus de Stefano Sanna (20)

Mobile Security su Android - LinuxDay 2018
Mobile Security su Android - LinuxDay 2018Mobile Security su Android - LinuxDay 2018
Mobile Security su Android - LinuxDay 2018
 
Android Things in action
Android Things in actionAndroid Things in action
Android Things in action
 
Introduzione alla tecnologia iBeacon
Introduzione alla tecnologia iBeaconIntroduzione alla tecnologia iBeacon
Introduzione alla tecnologia iBeacon
 
Augmented Smartphone
Augmented SmartphoneAugmented Smartphone
Augmented Smartphone
 
Bluetooth Low Energy
Bluetooth Low EnergyBluetooth Low Energy
Bluetooth Low Energy
 
Google TV: la nuova frontiera Android
Google TV: la nuova frontiera AndroidGoogle TV: la nuova frontiera Android
Google TV: la nuova frontiera Android
 
Enlarge your screen: introducing the Google TV
Enlarge your screen: introducing the Google TVEnlarge your screen: introducing the Google TV
Enlarge your screen: introducing the Google TV
 
Introduzione ad NFC
Introduzione ad NFCIntroduzione ad NFC
Introduzione ad NFC
 
NFC: tecnologia e applicazioni
NFC: tecnologia e applicazioniNFC: tecnologia e applicazioni
NFC: tecnologia e applicazioni
 
Android - Programmazione Avanzata
Android -  Programmazione AvanzataAndroid -  Programmazione Avanzata
Android - Programmazione Avanzata
 
HCIM08 - Mobile Applications
HCIM08 - Mobile ApplicationsHCIM08 - Mobile Applications
HCIM08 - Mobile Applications
 
Android & Bluetooth: hacking e applicazioni
Android & Bluetooth: hacking e applicazioniAndroid & Bluetooth: hacking e applicazioni
Android & Bluetooth: hacking e applicazioni
 
Application Store: opportunita' e trappole
Application Store: opportunita' e trappoleApplication Store: opportunita' e trappole
Application Store: opportunita' e trappole
 
Android Bluetooth Hacking
Android Bluetooth HackingAndroid Bluetooth Hacking
Android Bluetooth Hacking
 
Android
AndroidAndroid
Android
 
Free Software e Open Hardware
Free Software e Open HardwareFree Software e Open Hardware
Free Software e Open Hardware
 
Playing with Mobile 2.0
Playing with Mobile 2.0Playing with Mobile 2.0
Playing with Mobile 2.0
 
Sun SPOT
Sun SPOTSun SPOT
Sun SPOT
 
Comunicazione Pervasiva
Comunicazione PervasivaComunicazione Pervasiva
Comunicazione Pervasiva
 
Introduzione alla tecnologia Sun SPOT
Introduzione alla tecnologia Sun SPOTIntroduzione alla tecnologia Sun SPOT
Introduzione alla tecnologia Sun SPOT
 

Dernier

CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceCALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceanilsa9823
 
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPowerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPsychicRuben LoveSpells
 
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceanilsa9823
 
9892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x79892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x7Pooja Nehwal
 
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCRFULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCRnishacall1
 
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Pooja Nehwal
 
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort ServiceDelhi Call girls
 

Dernier (7)

CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceCALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
 
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPowerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
 
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
 
9892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x79892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x7
 
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCRFULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
 
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
 
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
 

Android Things, from mobile apps to physical world

  • 1. Android Things, from mobile apps to physical world Stefano Sanna ROME - APRIL 13/14 2018 Giovanni Di Gialluca
  • 2. OUTLINE • Android State Of The Nation and (quick) history • Android Things in one slide • Hardware and software: board and firmware • Environment: who’s in, who’s out • Hello Android Things! • Setup of a project • Overview of Android Things API • Merging Mobile & IoT • Vision and greetings
  • 4. Android: State of the Nation
  • 5. Fall 2007: Android is announced!
  • 6. Fall 2008: T-Mobile G1 lands in the US
  • 7. 2011: Honeycomb on Motorola Xoom
  • 8. 2014: Android Wear and Android TV
  • 11. Android Things in one slide Physical World Cloud
  • 13. Environment • Same architecture • Same IDE (Android Studio) • Same programming languages • Same framework • Same app (Activity) lifecycle • Same UI widgets (UI?) • Same application packaging • Same reliable security for apps and firmware upgrade • Same passionate community
  • 14. Android vs Android Things: IN & OUT Cast Drive Firebase Analytics Firebase Cloud Messaging Firebase Realtime Database Firebase Remote Config Firebase Storage Fit Instance ID Location Nearby Places Mobile Vision CalendarContract ContactsContract DocumentsContract DownloadManager MediaStore Settings Telephony UserDictionary VoicemailContract AdMob Android Pay Firebase Authentication, Links, Invites… Maps Play Games Search Sign-In
  • 15. SOM: Fast Prototyping to production
  • 16. Supported board NXP Pico i.MX7D NXP Pico i.MX6UL Raspberry Pi3 Model B PRICE $64 $43 $22 SDK PRICE $79 $69 $22 CPU 1 GHz dual-core ARM 500Mhz ARM 1.2GHz quad-core ARM RAM 512MB 512MB 1GB STORAGE 4GB eMMC 4GB eMMC microSD GPU NO NO Videocore CAMERA CSI-2 NO CSI-2 AUDIO Analog Analog USB 2.0 + Analog NET Ethernet, WiFi ac, BT 4.1 Ethernet, WiFi n, BT 4.1 Ethernet, WiFi n, BT 4.1 USB USB 2.0 HOST + 2x OTG 2x USB 2.0 OTG 4x USB 2.0 HOST GPIO 7x UART, 4x I2C, 4x SPI, 2x CAN, misc GPIO 8x UART, 4x I2C, 4x SPI, misc 48 GPIO 2x UART, 2x I2C, 2x SPI, up to 26 GPIO
  • 17. Raspberry Pi3 Model B • Damn cheap! • Good performances. • Ethernet + WiFi • HDMI + Camera • Lot of extension boards and kits: AI+VR+IoT! • You’ll never brick it: different configurations can be tested just swapping the SD. No eMMC. • Warning: no ADB via USB, a network is strictly required
  • 21. Console: Build (AT version)
  • 22. Console: Build (AT version)
  • 23. Device updates An UpdateManager utility class provides a easy way for the Android Things board to check if there is a new update
  • 24. Device updates Using the Console, you can easily create new product releases based on new Android Things versions or new app versions or both and push them to devices already deployed
  • 26. Hello_things app/module build.gradle dependencies { … compileOnly 'com.google.android.things:androidthings:+' } AndroidManifest.xml <uses-permission android:name="com.google.android.things.permission.USE_PERIPHERAL_IO" /> <application> <uses-library android:name="com.google.android.things" /> <activity android:name=".MainActivity"> <intent-filter> <!-- Main & Launcher for Android Studio --> </intent-filter> <!-- Launch activity automatically on boot --> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.IOT_LAUNCHER" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity> </application>
  • 27. public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); PeripheralManager service = PeripheralManager.getInstance(); Log.d("GPIO", service.getGpioList().toString()); Gpio mLedGpio = service.openGpio("BCM26"); mLedGpio.setDirection(Gpio.DIRECTION_OUT_INITIALLY_LOW); new Thread(new Runnable() { public void run() { for (int i = 0; i < 10; i++) { try { mLedGpio.setValue(i % 2 == 0); Thread.sleep(250); } catch (Exception e) {/*uh!uh!*/} } } }).start(); } } Hello_things Anode (longer pin) 330 Ohm
  • 29. Things Support Library GPIO PWM I2C SPI I2S Single-PIN analog/digital I/O Serial UART Pulse-Width-Modulation to control servo Slow serial bus for sensors Fast serial bus for boards interconnection Point-to-Point serial port Serial bus for audio streaming
  • 30. Driver Library From Hardware specs to interface • By Google https://github.com/androidthings/contrib-drivers • By Intel https://github.com/intel-iot-devkit/android-things-samples • By us https://github.com/giovannidg/androidthingsdrivers https://github.com/gerdavax/BrickPi3_AndroidThings
  • 31. Change settings programmatically • ScreenManager • Brightness, • Orientation • TimeManager • Time format • Time zone • Time auto update • DeviceManager • Factory reset • Set system locales • Reboot adb shell reboot –p unplug the power cord is not polite
  • 32. User Driver INPUT SENSOR GPS User Driver AUDIO Open Source GPIO PWM I2C SPI I2S Serial UART Peripheral Driver Library
  • 35. Mobile public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { ...... } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { boolean managed = MyKeyCodes.manageKeyCode(keyCode); if (managed) return true; return super.onKeyDown(keyCode, event); } }
  • 36. keycodelib public class MyKeyCodes { public static final int VOLUME_UP_KEY = KeyEvent.KEYCODE_VOLUME_UP; /** * @param keyCode * @return true if the event was managed */ public static boolean manageKeyCode(int keyCode) { if (keyCode == VOLUME_UP_KEY) { Log.d("KEY_LOG", “Ring the bell"); return true; // indicate we handled the event } return false; } }
  • 37. Things @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try { mInputDriver = new ButtonInputDriver("BCM4", Button.LogicState.PRESSED_WHEN_LOW, MyKeyCodes.VOLUME_UP_KEY// the keycode to send ); mInputDriver.register(); } catch (IOException e) { } // error configuring button... } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { boolean managed = MyKeyCodes.manageKeyCode(keyCode); if (managed) return true; return super.onKeyDown(keyCode, event); }
  • 38. to infinity and beyond
  • 39. Tensor Flow OpenSource library for Machine Learning § Developed by Google, Available For every OS § a computational graph is a series of tensorflow operation (nodes), each EDGE is a multidimensional data called Tensor § Public neural network pre-trained with one million of images, or you can train your neural Network with a provided pythOn library § Neural network model for image recognition called “Inception“ with 1000 categories
  • 40. BrikPi + Tensorflow § SPI to control motors and sensors § TensorFlow for object recognition
  • 41. BrikPi Raspberry Pi3 extension module with: § 4 Mindstorms NXT/EV3 Motor ports § 4 Mindstorms NXT/EV3 Sensor ports § Extra I2C sensor bus § SPI interface to Raspberry Pi3 § Uniform request/response binary protocol § Seamless power management (internal, external, both)
  • 43. Android Things Giovanni Di Gialluca giovanni.digialluca@gmail.com https://github.com/giovannidg www.linkedin.com/in/giovanni-di-gialluca Stefano «gerdavax» Sanna gerdavax@gmail.com @gerdavax https://www.linkedin.com/in/gerdavax