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
2010: 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

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
Xavier Hallade
 
Kinect installation guide
Kinect installation guideKinect installation guide
Kinect installation guide
gilmsdn
 
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
Benjamin Zores
 
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 (19)

Decrease build time and application size
Decrease build time and application sizeDecrease build time and application size
Decrease build time and application size
 
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
 
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
 
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 installation guide
Kinect installation guideKinect installation guide
Kinect installation guide
 
Kinect on Android Pandaboard
Kinect on Android PandaboardKinect on Android Pandaboard
Kinect on Android Pandaboard
 
NVIDIA SHIELD Launch Event at GDC 2015
NVIDIA SHIELD Launch Event at GDC 2015NVIDIA SHIELD Launch Event at GDC 2015
NVIDIA SHIELD Launch Event at GDC 2015
 
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
 
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
 
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
 
VR Base Camp: Scaling the Next Major Platform
VR Base Camp: Scaling the Next Major PlatformVR Base Camp: Scaling the Next Major Platform
VR Base Camp: Scaling the Next Major Platform
 
android mario project
android mario projectandroid mario project
android mario project
 
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, ...
 
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
 
Project Ara
Project AraProject Ara
Project Ara
 

Similaire à Android Things, from mobile apps to physical world - Stefano Sanna - Giovanni Di Gialluca - Codemotion Rome 2018

Android Meetup, Илья Лёвин
Android Meetup, Илья ЛёвинAndroid Meetup, Илья Лёвин
Android Meetup, Илья Лёвин
GDG Saint Petersburg
 
android_project
android_projectandroid_project
android_project
Adit Ghosh
 
SECON'2017, Кардава Звиад, Android Things + Google Weave
SECON'2017, Кардава Звиад, Android Things + Google WeaveSECON'2017, Кардава Звиад, Android Things + Google Weave
SECON'2017, Кардава Звиад, Android Things + Google Weave
SECON
 
Manish Chasta - Securing Android Applications
Manish Chasta - Securing Android ApplicationsManish Chasta - Securing Android Applications
Manish Chasta - Securing Android Applications
Positive Hack Days
 

Similaire à Android Things, from mobile apps to physical world - Stefano Sanna - Giovanni Di Gialluca - Codemotion Rome 2018 (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
 
Programming objects with android
Programming objects with androidProgramming objects with android
Programming objects with 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
 
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
 
SECON'2017, Кардава Звиад, Android Things + Google Weave
SECON'2017, Кардава Звиад, Android Things + Google WeaveSECON'2017, Кардава Звиад, Android Things + Google Weave
SECON'2017, Кардава Звиад, Android Things + Google Weave
 
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!
 
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
 
Manish Chasta - Securing Android Applications
Manish Chasta - Securing Android ApplicationsManish Chasta - Securing Android Applications
Manish Chasta - Securing Android Applications
 
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
 

Plus de Codemotion

Plus de Codemotion (20)

Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
 
Pompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyPompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending story
 
Pastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaPastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storia
 
Pennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserPennisi - Essere Richard Altwasser
Pennisi - Essere Richard Altwasser
 
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
 
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
 
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
 
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

Android Things, from mobile apps to physical world - Stefano Sanna - Giovanni Di Gialluca - Codemotion Rome 2018

  • 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. 2010: 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