Building friendly interfaces for industrial systems with Android
Objectives
Discover the Android system architecture
Learn to configure and compile the Android sources to get a working system
Understand the Android SDK and NDK
Learn how to build a simple application
Learn the basics of man-machine Interface with Android
Discover how to interface Java code and native code
Explore the Android source code architecture
The Android init process
System services
The Android Hardware Abstraction Layer
All labs will be conducted on an industrial, tablet form-factor, Sabre SDB board from Freescale, based on a Quad-core Cortex/A9 i.MX6 chip communicating with an external microcontroller board emulating the industrial system to control
Who should attend this course?
* Engineers that must develop Android applications to control industrial systems
* Architects that want to understand the benefit they may obtain from using Android in their products
What you will be able to do after the training
* Install Android on an embedded platform
* Interface an Android platform with an external system
* Create a typical Android Embedded application
Prerequisite
* Basic Linux user experience
* Basic C (or C++) programming skills
* Due to the high degree of advanced Java techniques being used, good Java development skills are mandatory
o See our cours L4G - Java pour Android for quickly learning the necessary Java techniques
Course environment
* Printed course material (in English)
* One Linux PC for two trainees
* One target Android platform (dual Cortex/A9) for two trainees
* External sensor hardware on an Arduino board connected in USB with the Android platform
First Day
Android Architecture Overview
* Linux and Android
* Android licensing
The Android Build System
* The Android code base
* Building Android
o The Android build environment
o The Android build system
o The Android.mk files
* Adding new components to the build system
o Java components
o Native components
o Applications
Exercice : Compiling the Android platform
Android Application Structure
* Structure of an Android Application
* Android application components
o Activity
o Service
o Broadcast receiver
o Content provider
* Manifest file
o Application components declaration
o Permissions
Exercice : Hello world application
* User interface configuration
o Depending on the language
o Depending on screen characteristics (dimensions, orientation…)
Exercice : Multilingual Hello world (Deutsch-English-Français)
The Android System Initialization
* Android properties
* The Android initialization
o Structure of the init process
o The Android initialization language
* The Dalvik Java virtual machine
o The Dalvik machine structure
o The Dalvik bytecodes
o The Dalvik “zygote” process
Exercice : Tailoring Android initialization to start additional system daemons
Second Day
Activities and user interface
* Activities life cycle
* Activity callbacks
o onCreate
o onStart…
* Intents and Intents filter
o The Intent class Intent
o Declaring Intent filters in manifest files
* Activity invocation with and without results
o startActivity
o startActivityForResult
* Tasks (activities stack) and navigation between activities
Exercice : Writing a simplified parameter entry application
Defining user interface layout
* Layouts
o Layout kinds
o Components properties related to layouts
* Resources
o Strings
o images
o layouts…
* Views
o Buttons, labels and edition fields
o View instantiation from a resource
* Specialized views
o ListView
o Data binding (Adapter class and subclasses)
* User Input
o Touch screen and keyboard
o Software keyboard management
* Dialogs and User notifications
o Dialog box
o Status Bar
o Toast
Exercice : Writing a simple Command and Control application
The Android Sensors
* Sensors in Android
o The sensor types
o The Sensor Manager
o Accessing Sensors
* Framework Architecture
o Sensor discovery
o Sensor Calibration
Exercice : Getting and displaying a sensor value (temperature...)
Third day
Android as a Distributed System
* The Android Binder architecture
* Binder implementation
o The AIDL language
o The AIDL tool
o Binder Java classes
* Writing Application Services * System services Exercice: Coding a service to control an external device
...
Fourth day
...
Android for Industrial System Control - G5