Android Application Development

Similar documents
Android Application Development Course Code: AND-401 Version 7 Duration: 05 days

ATC Android Application Development

Android Application Development Course 28 Contact Hours

Android ATC Android Security Essentials Course Code: AND-402 version 5 Hands on Guide to Android Security Principles

ANDROID SYLLABUS. Advanced Android

Android Application Development using Kotlin

Android App Development

ANDROID DEVELOPMENT. Course Details

Java Training Center - Android Application Development

1. Implementation of Inheritance with objects, methods. 2. Implementing Interface in a simple java class. 3. To create java class with polymorphism

Syllabus- Java + Android. Java Fundamentals

ANDROID TRAINING PROGRAM COURSE CONTENT

ORACLE UNIVERSITY AUTHORISED EDUCATION PARTNER (WDP)

Android Essentials with Java

Android App Development for Beginners

Android App Development. Muhammad Sharjeel COMSATS Institute of Information Technology, Lahore

Android App Development

Course Syllabus. Course Title. Who should attend? Course Description. Android ( Level 1 )

Android Online Training

Android. Lesson 1. Introduction. Android Developer Fundamentals. Android Developer Fundamentals. to Android 1

SEVEN ADVANCED ACADEMY

Course Learning Outcomes (CLO): Student Outcomes (SO):

android application development CONTENTS 1.1 INTRODUCTION TO O ANDROID OPERATING SYSTEM... TURES Understanding the Android Software Stack...

Required Core Java for Android application development

Introduction to Android

ANDROID APPLICATION DEVELOPMENT COURSE Training Program

ITG Software Engineering

Android Programming - Jelly Bean

CS 235AM, Mobile Application Development: Android Spring 2016

Lab Answer Key for Module 1: Creating Databases and Database Files

Android" Application Development SAMS. Sams Teach Yourself. Shane Conder. Lauren Darcey. Second Edition

CS260 Intro to Java & Android 04.Android Intro

GUJARAT TECHNOLOGICAL UNIVERSITY

Mobile Application Development

Android Basics Nanodegree Syllabus

Aimetis Symphony Mobile. 2.7.x. (Mobile Bridge and Mobile Devices) Copyright 2016 Aimetis Corp. 1

CORE JAVA& ANDROID SYLLABUS

Aimetis Android Mobile Application. 2.x Release Notes

Introduction. Lecture 1. Operating Systems Practical. 5 October 2016

Minds-on: Android. Session 1

Introduction to Android Android Smartphone Programming. Outline University of Freiburg. What is Android? Background University of Freiburg.

IT-G400 Series. Android 6.0 Quick Start Guide. This document is a Development Guide Book for IT-G400 application developers. Ver 1.

ANDROID NATIVE APP: INTRODUCTION TO ANDROID. Roberto Beraldi

Android Basics Nanodegree Syllabus

1. What are the key components of Android Architecture? 2. What are the advantages of having an emulator within the Android environment?

COURSE SYLLABUS ANDROID. Industrial Training (4 MONTHS) PH : , Vazhoor Road Changanacherry-01.

Android. Michael Greifeneder. Image source: Android homepage

CHAPTER 1: HELLO, ANDROID 1

Android App Development Workshop

Android Studio 3.0 Development Essentials Android 8 Edition

Tutorial on Basic Android Setup

Android Programming (5 Days)

Android Developer Nanodegree Syllabus

SHWETANK KUMAR GUPTA Only For Education Purpose

Software Development & Education Center ANDROID. Application Development

2017 WorkPlace Mobile Application

Introduction To Android

Hands-On Workshop on Google Android Developer Fundamentals

Android Fundamentals - Part 1

Introduction to Android

Android Apps Development

Deep Dive into Apps for Office with Word

Mumbai Android Bootcamp -Course Content

NVIDIA CAPTURE SDK 7.1 (WINDOWS)

Oracle Mobile Application Framework

Beginning Android 4 Application Development

Hello World. Lesson 1. Create your first Android. Android Developer Fundamentals. Android Developer Fundamentals

Android Training Overview (For Demo Classes Call Us )

Diploma in Android Programming (DAP)

Expression Design Lab Exercises

Aimetis Symphony Mobile ios Mobile Application

CS 4518 Mobile and Ubiquitous Computing Lecture 2: Introduction to Android. Emmanuel Agu

ANDROID COURSE BROCHURE

IBM Datacap Mobile SDK Developer s Guide

Lab Answer Key for Module 8: Implementing Stored Procedures

MC Android Programming

Microsoft Dynamics NAV

Mobile OS. Symbian. BlackBerry. ios. Window mobile. Android

Mobile development initiation

IGEEKS TECHNOLOGIES. Software Training Division. Academic Live Projects For BE,ME,MCA,BCA and PHD Students

Answers to Exercises

Beginning Android Tablet

Android App Development. Ahmad Tayeb

Android Overview. Most of the material in this section comes from

Testing Gear Companion Apps using the Gear Emulator

AND-401 Android Certification. The exam is excluded, but we cover and support you in full if you want to sit for the international exam.

RMH GENERAL CONFIGURATION

ONVIF Server for Aimetis Symphony. Installation and Usage

Pemrograman Mobile. Lesson 1. Introduction to Android. Create Your First Android App. Nizar Rabbi Radliya

Android Application Development A Beginners Tutorial

HUAWEI H30-U10. Quick Start Guide

Mobile and Ubiquitous Computing: Android Programming (part 1)

6/29/ :38 AM 1

Aimetis Symphony Mobile Bridge. 2.7 Installation Guide

Mobile Application Development

CS 403X Mobile and Ubiquitous Computing Lecture 5: Web Services, Broadcast Receivers, Tracking Location, SQLite Databases Emmanuel Agu

Aimetis Mobile Bridge. 2.7 Release Notes

Windows Server 2012: Manageability and Automation. Module 1: Multi-Machine Management Experience

BlackBerry Developer Summit. A02: Rapid Development Leveraging BEMS Services and the AppKinetics Framework

A Customizable Travel Application- Travel-It

Transcription:

Android Application Development Course Code: AND-401 Version 7 (Nougat) 2016 Android ATC Published by: Android ATC Fourth Printing: December 2016. First Printing: October 2013. ISBN: 978-0-9900143-8-6 Information in this book, including URL and other Internet Web site references, is subject to change without notice. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Android ATC. Android ATC is not responsible for webcasting or any other form of transmission received from any linked site. Android ATC is providing these links to you only as a convenience, and the inclusion of any link does not imply endorsement of Android ATC of the site or the products contained therein. Android ATC Company may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. As expressly provided in any written license agreement from Android ATC, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property. Android application development is a detailed guide that provides the basics to build Android applications. It is a combination of theoretical lessons and practical labs that covers skills and knowledge every Android developer should learn before starting the development of real world applications. At the time of writing this book, the latest version of Android OS released was 7 (Nougat) and that of Android Studio was 2.2. All lessons and their lab exercises in this book were built under these latest versions. Since the update of both Android OS and Android Studio is a continuous process, it is highly possible that any of these components has already II

been updated by the time you start your training using this book. If this is the case, you might notice some minor difference in the lab steps and the screenshots provided, depending on how a major an update has been. This neither makes the lessons outdated nor the labs incorrect. It is only impractical to release a new version of the book for every update. This book is intended for trainees with background in object oriented programming. It is expected that such differences between the Android Studio version you are using and the one followed in the book, should not constitute an obstacle for learning and following the labs. Android ATC Training team continuously works on providing the most up to date labs and code samples. Nonetheless, we would like to apologize in advance in case any lab step or screenshot is inaccurate. Warning and Disclaimer: This book is designed to provide information about Android application development course and exam AND-401. Every effort has been made to make this book as complete and as accurate as possible. Exam You can examine your knowledge on the content of this book by taking the online exam AND-401 through Pearson-VUE testing centers worldwide. Passing this exam grants the http:// www.pearsonvue.com/androidatc Or, you may schedule your exam at any Android ATC authorized training center worldwide. Check Android ATC web site for more information.. Trademark Acknowledge: All terms mentioned in this book are known to be trademarks or service marks have been appropriately capitalized. Use of a term in this book should not be regarded as affecting the validity of any trademark or service mark. from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License. III

Table of Contents Lesson 1: Android Framework and Android Studio Android Platform Architecture... Linux Kernel... Hardware Abstraction Layer (HAL)... Android Runtime (ART)... Native C/C++ Libraries... Java API Framework... System Apps... Android Libraries... Components of Android Application... Types of Android processes and their priorities... Pre-requisites for Android Application Development... Android Studio... Gradle... Instant Run... Lab 1: Creating Your First Application... 1-2 1-2 1-3 1-3 1-3 1-3 1-4 1-4 1-4 1-6 1-8 1-9 1-10 1-10 1-11 1-12 Lesson 2: AndroidTM SDK Tools and Activity Class Android Project Structure... The Android Manifest File... Structure of the Manifest File... Android SDK Tools... Android Device Monitor... Android Debug Bridge (ADB)... Batterystats and Battery Historian...... Emulator Controls... Send/Receive SMS... Make Calls... Update Locations... Building Backward-Compatible Android Applications... Activity... Activity Life-Cycle Through Java... 2-2 2-5 2-5 2-6 2-6 2-12 2-17 2-22 2-22 2-23 2-26 2-27 2-31 2-32 2-32 V

Create an Activity... 2-34 Methods to Remember... 2-36 Lab 2: Studying Activity Life-Cycle... 2-37 Lesson 3: Fragments, Views, and List View Fragments... Fragments Life-Cycle... Creating a Fragment Sub-Class... Adding Fragments in Application... Backward Compatibility of Fragments... Views... Using Views... Adding a View to your application... List View and List Activity... Using a ListActivity... Adding ListView... Add Event to List Items... Summary... Recycler View... RecyclerView vs ListView... Adding RecylerView... Card View... Runtime Permissions... Methods to Remember... Lab 3: Views and Runtime Permissions... 3-2 3-2 3-3 3-5 3-6 3-8 3-9 3-9 3-9 3-12 3-13 3-15 3-18 3-18 3-19 3-20 3-20 3-21 3-22 3-23 3-24 Intents... Explicit Intents... Implicit Intents... Native Android Actions... Data Transfer... Intent to Call Activities... Direct Calls... Sub-Activities: Calling Activities for Results... 4-2 4-2 4-2 4-3 4-4 4-4 4-6 4-6 4-6 VI

Register an IntentFilter... Deep Linking... Testing Deep Linking... Methods to Remember... Lab 4: Creating Constants Selection Application and Testing Deep Linking... 4-8 4-10 4-11 4-11 4-12 Lesson 5: Android Layouts and Custom Views Views... Layouts... Layout Properties... Loading the Layout from Code... Loading Layout in an Activity... Loading Layout in a Fragment... Creating and Editing Layouts in Android Studio... Customized Views... Modify Existing Views... Step by Step... What is in ondraw( )?... The full picture... ConstraintLayout... Lab 5: Custom View, Drawer Layout, and Fragments Application... 5-2 5-2 5-2 5-3 5-5 5-5 5-5 5-6 5-7 5-8 5-8 5-10 5-10 5-13 5-16 Lesson 6: Android Resources, Themes, and Material Design Android Resources... Why Using Resources?... Adding Resources to your Application... Using Resources... Types of Resources... Android Themes and Styles... Creating Themes... Android Material Design... Using the Material Theme... Color Palette... Activity Transitions & Shared Element Transitions... Methods to remember... 6-2 6-2 6-2 6-2 6-4 6-5 6-6 6-9 6-10 6-10 6-11 6-12 6-13 VII

Lab 6: A To-Do List Application in Material Design... 6-14 Lesson 7: Android UI Dialogs, Menus, and WebView User Interaction through Messages... Dialogs... Dialog Sub-Classes...... Creating an Alert Dialog... Creating a Progress Dialog... Activities with Dialog Theme... Toasts... Customizing Toasts... Snackbar... Simple Snackbar... Custom Snackbar... Menus... Building a menu from Java code...... Sub-menus... Context Menus... Additional Menu Item Options... Popup Menus... Web View... Methods to Remember... Lab 7: Wallpaper Application... 7-2 7-2 7-2 7-2 7-3 7-3 7-6 7-8 7-8 7-9 7-12 7-12 7-13 7-14 7-15 7-16 7-18 7-19 7-20 7-22 7-23 7-25 7-27 Lesson 8: Android Storage and Background Processing Android Storage Options... File I/O...... Shared Preferences... Retrieving Shared Preferences... Save activity State... Connecting to the internet... Background Processing... Android Threading... VIII 8-2 8-2 8-2 8-3 8-4 8-5 8-7 8-9 8-9

Java Threads... AsyncTask... Android Services... Background Fragments... Background Receivers... Lab 8: Quotes Provider Application... 8-10 8-10 8-12 8-14 8-14 8-16 Lesson 9: Android Storage: SQLite and Content Providers SQLite Database in Your Application... SQLite Library... SQLiteOpenHelper... SQLite Database... Cursors... Databases in Android... Content Providers... Native Android Content Providers... Custom Content Provider... Sync Adapters... Introduction... How SyncAdapters Work... ORMLite... Methods to Remember... Lab 9: SQLite Databases and Content Providers... 9-3 9-3 9-6 9-7 9-9 9-14 9-14 9-14 9-16 9-17 9-18........................... Base Layout... 10-2 10-2 10-3 10-3 10-7 10-8 10-8 10-9 10-9 10-9 10-9 IX

Expanded Layouts........................ 10-10 10-11 10-11 10-11 10-12 10-12 10-12 10-14 Lesson 11: Location Aware Apps Using GPS and Other Providers What is GPS and how it works?... Other location service providers... Methods to capture user location... Using Google Maps... Setting Geolocation... Pins, Layers and custom drawing... Reverse Geolocation and Geocoder Class... Requesting User Permission For Location Access... Testing GPS on Android Emulator... Mocking Location on an Emulator... LAB 11 : Location-Aware Apps Using the GPS and Google Maps... X 11-2 11-2 11-3 11-3 11-5 11-12 11-12 11-15 11-16 11-18 11-20 11-22