Advanced Android APIs Training Course
Course Summary
This is an à la carte menu of various advanced Android topics, or modules. Each module is independent of one another. Modules can be assembled into a custom course to fit specific needs.
This course assumes you already have a basic knowledge of designing and building a very simple Android app.
[top] Duration
20 days, 3 hours per day.
Advanced Android APIs is composed of the following:- Binder Inter Process Communications (1 day)
- Native Development Kit (NDK) (3 hours)
- Testing Android Apps (3 hours)
- Connectivity APIs (3 hours)
- Android Audio and Video APIs (3 hours)
- Android WebKit API (3 hours)
- Android Location API (3 hours)
- Security for Android (3 hours)
- Gesture API (3 hours)
- Near Field Communication (NFC) API (3 hours)
- Session Initiation Protocol (SIP) API (3 hours)
- WiFi Direct API (3 hours)
- Content Providers in Depth (3 hours)
- Graphics for Android (3 hours)
- Android Renderscript (3 hours)
- Sensor API (3 hours)
- Device Administration API (3 hours)
- Enterprise Data Management (3 hours)
[top] Objectives
The objectives of Andvanced APIs it to provide specific skills on one of many different Android APIs. We think of it as bolt-on incremental knowledge for those already familiar with basics on Android app development.
[top] Prerequisites
To take this course, you should be familiar with basics of Android applicatoin development. You may have taken Android Bootcamp course, Intro to Android course, or similar.
You should be able to answer the following questions:
- What are the main Android app building blocks?
- What is the lifecycle of an Activity?
- How to create a Service?
- What are Intents and how to use them?
- How do you implement a Broadcast Receiver?
- How do you create a simple UI in Android?
[top] Outline
Binder Inter Process Communications (1 day)
This module covers the fundamentals of the Android Inter-process communication based on the Binder. By the end of this module, you will understand how to create bound services, how to send parcels across the process lines, and how to make asynchronious binder calls. We will illustrate the key capabilities of the Android IPC menachism on a working example app that progressively becomes more and more sophisticated. Topics covered include the following:
- Parcelables and serialization
- Binder and IPC fundamentals
- Binding a service
- AIDL and publishing an API
- Creating and binding to a remote service
- Implementing client-side service connection
- The purpose of stubs and proxies
- Passing parcelable data between processes
- Making asynchronous binder calls
Native Development Kit (NDK) (3 hours)
Android is put together of about equal part Java and C. So, no wonder that we need an easy way to bridge between these two totally different worlds. Java offers Java Native Interface (JNI) as a framework connecting the world of Java to the native code. Android goes a step further by packaging other useful tools and libraries into a Native Development Kit, or NDK. NDK makes developing C/C++ code that works with an Android app much simpler than if one was to do it by hand. Topics covered include:
-
What is in NDK?
-
Why NDK?
-
Java Native Interface (JNI)
-
Using NDK
-
NDK and JNI by Example
-
NDK's Stable APIs
-
Lab: NDK
Testing Android Apps (3 hours)
Testing is an important part of any app development. There are many facets of testing, such as unit testing, performance, or functional testing. In this module, you will get an overview of various tools that Android supports for testing apps. Students will understand and be able to use JUnit both from Java and from the Android platform. They will become familiar with basic IoC coding patterns and be able to use the Mocks provided as part of the Android platform. In addition students will become proficient with other tools: TraceView, Monkey, and the Debugger. Topics covered include:
- Testing guidelines: why test and what to test
- JUnit framework: general overview of unit testing and Java's JUnit framework
- Android's unit testing framework: focus on Android JUnit extensions
- Using the exercise monkey test tool: pseudo-randomly testing the UI
- Using monkeyrunner tool: scripting functional test cases for your app
- Other testing tools and frameworks: the third-party resources
Connectivity APIs (3 hours)
Android provides support for quite a few ways to connect your device to other devices and the cloud. In this module, we'll explore the capabilities of Android connectivity APIs. This module is a comprehensive overview of connectivity APIs. For a deep dive into a specific type of connectivity, look up a related module. For each API, we will look at an example app that illustrates its key features. Topics covered include:
- Bluetooth
- NFC
- Wifi
- Wifi Direct
- USB
- Best practices: optimizing for battery
Android Audio and Video APIs (3 hours)
Android provides a rich set of APIs to support various audio and video playback and recording. In this module, you will learn how to create an audio recorder and playback app, a video recorder and a camera app. Topics covered include:
- Audio playback: Playback and streaming, management of audio policies, hardware and focus.
- Audio recorder: Capturing audio and saving it on the device.
- Video playback: Playback of prerecorded video files.
- Camera: How to record video as well as take pictures in both raw and jpeg formats.
Android WebKit API (3 hours)
WebKit is a very important library, not only because it runs most of the world's web browsers, but also because it allows you to build Android apps using HTML and Javascript. In this module, you will learn how Android exposes WebKit functionality via WebView. You will learn about it's features as well as how to integrate web content with the rest of your app. Topics covered include:
- Using WebView in your apps
- Building Web Apps in WebView
- Using Javascript in your code and binding it to your Java code
- Handling page navigation
- Debugging Web Apps
- Best Practices for Web Apps
Android Location API (3 hours)
Location is one of the key features for a mobile device. In this module, you will learn how Android location framework works and best practices for using it. Topics covered include:
- Location service overview
- Using various location providers
- Using location listeners
- Overview of geo coding
- Overview of Google Maps external library
Security for Android (3 hours)
- Overview of Android security architecture
- Application signing
- UserIDs and file system
- Using permissions
- Declaring and enforcing permissions
Gesture API (3 hours)
- Overview of Gesture APIs
- Using gesture library
- Creating new gestures
Near Field Communication (NFC) API (3 hours)
- Overview of NFC protocol
- The tag dispatch system
- How tags are mapped to MIME types and URIs
- How tags are dispatched to apps
- Updating the Manifest file
- Filtering for NFC intents
- Creating common types of NDEF records
- Beaming NDEF messages to other devices
- Reading and writing to tags
- Using foreground dispatch system
Session Initiation Protocol (SIP) API (3 hours)
- SIP Overview
- Updating the Manifest file
- Using SipManager
- Registering with Sip Server
- Making audio calls
- Receiving calls
- Testing your SIP app
WiFi Direct API (3 hours)
- Wifi P2P Overview
- Using WifiP2pManage
- Discovering peers
- Connecting to peers
- Transferring data
- Creating a Wifi Direct demo app
Content Providers in Depth (3 hours)
- Best practices for SQLite Content Providers
- FIle base Content providers: BLOBs and JSON
- Network based Content providers and caching
- Using Cursors
- Optimizing Cursors for IPC
- URI Design
Graphics for Android (3 hours)
- Measurement and Layout
- Paint and Canvas
- Drawables
- Matrix transformations
- Animation
- OpenGL and the rendering pipeline
Android Renderscript (3 hours)
- Renderscript, the Language
- The GPU and the rendering pipeline
- Renderscript development tools
- The Renderscript Compute interface
Sensor API (3 hours)
In this module, developers will be introduced to the Android Sensor Manager and the APIs for the devices it controls. You will learn to use each of the standard sensors, such as temperature, light, pressure, acceleration, motion, and orientation. Topics covered include:
- Introduction to the Sensor Manager
- Overview of various sensors
- Listening to sensors and processing sensor data
- Best practices for working with sensors
Device Administration API (3 hours)
Device Administration API provide a framework for creating apps that can enforce certain policies on a device. These policies were designed with the enterprise requirements in mind. In this module you will learn what Device Admin API can and cannot do, as well as how to create an application that becomes an administrator on user's device. Topics covered include:
- Overview of Device Administration API
- Supported policies
- Developing a Device Administration app
- Managing and enforcing policies
Enterprise Data Management (3 hours)
- Android REST APIs
- Content Provider as service proxy
- Content Provider as look-aside cache
- JSON Schema and Content Provider autogeneration