Android Tutorials - Herong's Tutorial Examples

http://www.herongyang.com/Android

Copyright © 2017 by Dr. Herong Yang. All rights reserved.

Android Tutorials This free book is a collection of notes and sample codes written by the author while he was learning Android system. Topics include AAPT, Android, ADB, API, Dalvik, emulator, Java, layout, logcat, shell, SDK, USB, view.

Table of Contents

About This Book

Installing JDK 1.8 on Windows System

Downloading and Installing JDK 1.8

Writing My First Java Program

Setting JAVA_HOME Environment Variable

Installation of Android SDK R24 and Emulator

Downloading and Installing Android SDK R24

Running Android SDK Manager R24

Installing Android Platform 4.0.3 and Libraries

Verifying Android Platform Installation

Creating Android Virtual Device (AVD)

Viewing Android Virtual Device (AVD) Details

Launching Android Emulator in AVD Manager

Android Emulator Starting Screens

Android Emulator Built-in Apps and Widgets

Android Emulator Built-in Web Browser

Android Emulator for 7 Inch Tablet

Android Emulator for Google Watch

Missing Emulator Engine Program for 'arm' CPUS

x86 Emulation Requires Hardware Acceleration

HAXM - Hardware Accelerated Execution Manager

Installing Apache Ant 1.9 on Windows System

Downloading and Installing Apache Ant 1.9

Preparations on Using Apache Ant Tool

First Apache Ant Build File Example

Developing First Android Application - HelloAndroid

Creating Android Project with "android" Command

Listing Target Android Platforms

"HelloAndroid" - First Android Project

"HelloAndroid.java" - First Android Java Code

"ant debug" Command and Build Error

Building the Debug Binary Package

Installing the Debug Binary Package

Running the Debug Binary Package

Android Application Package (APK) Files

What Is APK File Format?

Android PDF Viewer APK File Contents

Installing Android PDF Viewer APK File

Copy PDF File to Android Emulator's File System

Installing Adobe Reader APK File

Android Debug Bridge (adb) Tool

What Is Android Debug Bridge (adb)

Commands and Options Supported by "adb"

"adb install" and "adb uninstall" Commands

"adb shell" - Remote Shell Interface

"adb push" and "adb pull" Commands

Android File Systems

Android 5.1.1 Emulator File Systems

Android 5.1.1 Emulator File System Hierarchy

Android 4.0.3 File Systems

Android 4.0.3 Emulator File Systems

Android 4.0.3 Emulator File System Hierarchy

AboutAndroid - Application to Retrieve System Information

java.lang.System Class - Accessing System Information

Creating Android Project for Simple Application

Build, Install and Run Android Application

System.getProperties() - Retrieving System Properties

android.widget.ScrollView Class - Scrolling Text View

System.getenv() Method - System Environment Variables

android.os.Environment Class - Environment Folders

android.content.Context - Application Context Information

android.app.Activity Class and Activity Lifecycle

Introduction of Activity Lifecycle

onCreate() and Other Callback Methods

ActivityLog - Application to Create Log File

Viewing Activity Log File with "cat" Command in "adb shell"

Implementing Activity Callback Methods

ActivityLog Test - Activity Terminated by User

ActivityLog Test - Activity Stopped and Restarted

ActivityLog Test - Activity Paused and Resumed

View Objects and Layout Resource Files

android.view.View Class - Base of User Interface Components

View, ViewGroup, Layout, and Widget

What Is Layout Resource File?

AndroidView v1.0 - Creating a Layout in Java Class

AndroidView v2.0 - Creating a Layout in Resource File

AndroidView v3.0 - Referencing Views in Resource Files

AndroidView v3.1 - Layouts with Vertical Orientation

AndroidView v3.2 - Layouts with Horizontal Orientation

AndroidView v4.0 - Inserting Views to Parent Layout

Using "adb logcat" Command for Debugging

"adb logcat" Command - Displaying System Logs

"adb logcat" Command Options and Log Buffers

"adb logcat -v" Command - Log Format Control

"adb logcat" Command Arguments - Output Filters

Using "adb logcat" Command to Track the Lifecycle of an Application

Java Exceptions in AndroidRuntime Error Log

Build Process and Package File Content

"android create project" Command Options

Android Project Folder Structure

Android Application Project Build Process

Project Build Process Done by "ant debug" Command

Detailed Output of "ant -verbose debug" Command

Output of "ant -verbose debug" - Android SDK R17

"aapt" - Android Asset Packaging Tool

"aapt package" Command - Resource Code Generation

"javac" - Java Compilation Command

"dx.bat --dex" Command - Converting .class Files into .dex File

"apkbuilder" Command - Packaging and Signing .apk File

"zipalign" Command - Aligning File Locations in .apk Package

"aapt dump" Command - Printing Contents of .apk Package

META-INF Files - Digests, Signature and Certificate

Building Your Own Web Browser

android.webkit.WebView - Web Browser Base Class

AndroidWeb - My Own Web Browser

WebViewClient Subclass - Content Rendering Callbacks

saveWebArchive() Method - Saving Web Archive Files

Web Archive File - XML File of Base64 Encoded Data

Android Command Line Shell

What Is the Bourne Shell?

Bourne Shell Command Line Examples

Unix/Linux Command Line Programs

Android Command Line Tools

"dalvikvm" Command to Run Java Application

Samsung Galaxy Tab 3 Mini Tablet

About My Samsung Galaxy Tab 3 Mini Tablet

Samsung Galaxy Storage Usage

Running Services - Background Processes

Connect tablet to Computer using Bluetooth

Connect tablet Storage to Computer via USB

Using Wi-Fi to Connect to Internet

Setting up Gmail Access on Android tablet

Downloading and Installing from "Play Store"

USB Debugging Applications on Samsung Tablet

Samsung USB Driver for Mobile Phones

Turning on USB Debugging on Samsung Galaxy Tab 3

Running "adb" on USB Debugging Interface

Installing Application to Tablet using "ant installd"

Installing Application to Tablet using "adb -d install"

Installing "AboutAndroid" to Samsung Tablet

Android Tablet - LG-V905R

About My LG-V905R Android Tablet

Tablet Memory Usage

Running Services - Background Processes

Connect tablet to Computer using Bluetooth

Connect tablet Storage to Computer via USB

Using Wi-Fi to Connect to Internet

Setting up Gmail Access on Android tablet

Downloading and Installing from "Play Store"

USB Debugging Applications on LG-V905R Tablet

Turning on USB Debugging on LG-V905R

Viewing LG-V905R Android USB Device in Control Panel

Running "adb" on LG-V905R USB Debugging Interface

Installing Application to Tablet using "ant instald" Command

Installing Application to Tablet using "adb -d install" Command

Installing "AboutAndroid" to LG-V905R Tablet

Android Phone - LG-P925g

About My LG-P925g Android Phone

Phone Memory and SD (Secure Digital) Card

Running Services - Background Processes

Running Applications - Background and Foreground Processes

Connect Phone to Computer using Bluetooth

Connect Phone SD Card to Computer via USB

Using Wi-Fi Function to Reduce Data Cost

Setting up Gmail Access on Android Phone

Downloading and Installing from "Play Store"

USB Debugging Applications on LG-P925g Phone

Installing LG USB Device Driver on Windows

Viewing LG Android USB Device in Control Panel

Turning on USB Debugging on LG-P925g

Viewing USB Debugging Devices in Control Panel

Running "adb" on LG-P925g USB Debugging Interface

Installing Application to Phone using "ant installd" Command

Installing Application to Phone using "adb -d install" Command

"adb -d install" Command Options

Installing "AboutAndroid" to LG-P925g Phone

Developing Applications with Android API Level 7

Outdated Tutorials

Outdated: Downloading and Installing JDK 1.7

Outdated: Downloading and Installing Android SDK R17

Outdated: Running Android SDK Manager

Outdated: Installing Android Platform 4.0.3 and Libraries

Outdated: Verifying Android Platform Installation

Outdated: Creating Android Virtual Device (AVD)

Outdated: Launching Android Emulator in AVD Manager

Outdated: Android Emulator Built-in Applications

Outdated: Android Emulator Built-in Web Browser

Outdated: Downloading and Installing Apache Ant 1.8

Outdated: "HelloAndroid" - First Android Project

Outdated: Building the Debug Binary Package

Outdated: Installing the Debug Binary Package

Outdated: Running the Debug Binary Package

Outdated: Rebuild the Debug Binary Package

Outdated: Redefine Text in Resource Files

Outdated: Installing Android PDF Viewer APK File

Outdated: Copy PDF File to Android Emulator's File System

Outdated: Installing Adobe Reader APK File

Outdated: "adb shell" - Remote Shell Interface

Outdated: "adb push" and "adb pull" Commands

References

PDF Printing Version

Keywords: Android, SDK, Application, Development