0% found this document useful (0 votes)
28 views

Android Application Development v12 - Course Outline

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Android Application Development v12 - Course Outline

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Exam Code: AND-X01

Android Application
Development version 12

• Covers a wide range of Android development topics.


• Demonstrates visual, behavioral and motion rich Android widgets.
• Displays step-by-step lab exercises to build Android apps.
• Includes guides to build Google Maps and Firebase database apps.
• Presents Android app publishing guidelines.

By Android ATC Team www.androidatc.com


Android ATC

AndroidTM Application Development


Exam Code:AND-X01
Hands-on Guide to Android Application Development

Course Outline
Android ™ Application Development

Android Application Development

Exam Code: AND-X01

© 2021 Android ATC Published by: Android ATC


Sixth Printing: October 2021.
First Printing: October 2013.
ISBN: 978-0-9900143-0-0

Information in this book, including URL and other Internet Web site references, is subject
to change without notice. Complying with all applicable copyright laws, 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)
for any purpose, without an express written permission from 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 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.

All lessons and their lab exercises in this book were built to comply with the latest versions
of Android SDK and Android Studio IDE. Since the update of both Android SDK and Android
Studio is a continuous process, it is highly possible that any of these components has
already been updated by the time you start your training using thisbook. If this is the case,
you might notice some minor difference in the lab steps and the screenshots provided,
depending on how major an update has been. Updates neither make 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 to have such differences between the Android Studio version you
are using and the one followed in the book; however, this should not constitute an obstacle
for learning and following the labs.
Android ™ Application Development AND-X01

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 was inaccurate.

Warning and Disclaimer:


This book is designed to provide information about Android application development course
and exam AND-X01. 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-X01 through Pearson-VUE testing centers worldwide. Passing this exam grants the
examinee the title: “Android Certified Application Developer". For more information, visit:
https://home.pearsonvue.com/androidatc

Besides, you may schedule your exam at any Android ATC authorized training center
worldwide or you may select the online proctored exam choice which allows you to
conveniently and easily take an exam at the comfort of your home or office while being
monitored by a remote proctor. Check Android ATC web site for more information.

Trademark Acknowledge:
All terms mentioned in this book that are known to be trademarks or service marks have
been appropriately capitalized. The use of a term in this book should not be regarded as
affecting the validity of any trademark or service mark.

Android is a trademark of Google Inc. The Android robot is reproduced or modified from
work created and shared by Google and used according to terms described in the Creative
Commons 3.0Attribution License.

Feedback Information:
As Android ATC, our goal is to create in-depth technical books of the highest quality and
value. Each book is crafted with care and precision, undergoing rigorous development that
involves the unique expertise of members from professional technical community.

Readers’ feedback constitutes the natural continuation of this process. If you have any
comments regarding how we could improve the quality of this book, or otherwise modify it to
better suits your needs, you may contact us by email at: [email protected]. Please make
sure to include the book title and ISBN in your message.

We greatly appreciate your assistance. Android ATC Team


Android ™ Application Development

Table of Contents
Lesson 1: Introduction to Kotlin

Kotlin History ......................................................................................................................... 1-1


Kotlin Advantages .................................................................................................................. 1-1
How Kotlin Programs Work?.................................................................................................. 1-2
Kotlin Software Prerequisites................................................................................................ 1-3
IntelliJ IDEA............................................................................................................................. 1-4
Installing IntelliJ IDE ............................................................................................................. 1-4
Creating a Kotlin Program ..................................................................................................... 1-15
Running a Kotlin Program...................................................................................................... 1-17
The main( ) function............................................................................................................... 1-18
Writing Comments.................................................................................................................. 1-20
Kotlin Variables....................................................................................................................... 1-21
Kotlin Data Types.................................................................................................................... 1-22
Input of Information to Kotlin Program ................................................................................ 1-33

Lesson 2: Control Flow Statements

Introduction ............................................................................................................................ 2-1


If Statement ............................................................................................................................ 2-1
If – Else Statement ................................................................................................................. 2-4
If Else and Logical Operators................................................................................................. 2-6
When Statement and Expression ......................................................................................... 2-8
For Loops................................................................................................................................. 2-9
While Loops............................................................................................................................. 2-12
Do-while Loops ...................................................................................................................... 2-13
Jump Expressions .................................................................................................................. 2-15
Break Statement................................................................................................................. 2-15
Continue Statement ........................................................................................................... 2-16
Return Statement ............................................................................................................... 2-16
Functions ................................................................................................................................. 2-17
Function Structure.............................................................................................................. 2-17
Creating a Function ........................................................................................................... 2-18
Functions and Variable Scope .......................................................................................... 2-22
Android ™ Application Development AND-X01

Lesson 3: Functions & Object-Oriented Programming (OOP)

Object-Oriented Programming (OOP) .................................................................................. 3-1


Object ...................................................................................................................................... 3-1
Class ........................................................................................................................................ 3-1
Creating a Class ................................................................................................................. 3-2
Providing Constructors for Your Classes ......................................................................... 3-6
Class Inheritance ............................................................................................................... 3-7
Abstract Class .................................................................................................................... 3-11
Interface Class ................................................................................................................... 3-15
Generic Class ..................................................................................................................... 3-21
Class Variables................................................................................................................... 3-23
Member Variables.............................................................................................................. 3-23
Kotlin Collections ................................................................................................................... 3-26
Hashmaps .......................................................................................................................... 3-26
ArrayList.............................................................................................................................. 3-30
listof and mutableListOf .................................................................................................... 3-35

Lesson 4: Android Framework and Android Studio


Introduction............................................................................................................................. 4-1
Android Platform Architecture .............................................................................................. 4-1
Android Libraries .................................................................................................................... 4-3
Components of Android Application..................................................................................... 4-4
Types of Android processes and their priorities.................................................................. 4-7
Android Studio ....................................................................................................................... 4-8
What is Android Studio? ................................................................................................... 4-8
Android Studio Software Prerequisite ............................................................................. 4-9
Install Android Studio ........................................................................................................ 4-13
Creating Kotlin Project Using Android Studio ..................................................................... 4-20
Run Android App .................................................................................................................... 4-23
Instant Run ........................................................................................................................ 4-27
Setup an Android Virtual Device .......................................................................................... 4-27
What is Android Studio Gradle? ............................................................................................ 4-29
Run your Apps on a Hardware Device (Physical Phone)..................................................... 4-30
Run your Android App on Android Phone ......................................................................... 4-30

Lab 4: Creating Your First Application ................................................................................. 4-35


Create your first Android application .............................................................................. 4-36
Build a “Simple Calculator” Application ......................................................................... 4-40
Android ™ Application Development

Lesson 5: Creating User Interface

Introduction ............................................................................................................................. 5-1


Android Project Structure ...................................................................................................... 5-1
View ......................................................................................................................................... 5-5
Adding a View to your application..................................................................................... 5-5
Adding a View in an XML layout file................................................................................... 5-5
Adding a View using Kotlin code........................................................................................ 5-8
Configuring Layout Views................................................................................................... 5-8
Creating a User Interface ....................................................................................................... 5-10
Adding a Text Box............................................................................................................... 5-10
Adding an Image................................................................................................................. 5-13
Adding a Check Box............................................................................................................ 5-18
Adding a Radio Button........................................................................................................ 5-27

Lab 5: Creating a Pizza Order Application ............................................................................ 5-34


Create Your Application User Interface ........................................................................... 5-35
Configure the Android Application Code ......................................................................... 5-42
Run Your Application.......................................................................................................... 5-46

Lesson 6: Android Layouts, Styles, Theme and Menus

Introduction ............................................................................................................................. 6-1


Views........................................................................................................................................ 6-1
Layouts..................................................................................................................................... 6-1
Constraint Layout................................................................................................................ 6-3
Linear Layout....................................................................................................................... 6-5
Relative Layout.................................................................................................................... 6-8
TableRow Layout................................................................................................................. 6-14
Frame Layout....................................................................................................................... 6-17
Android Styles and Themes.................................................................................................... 6-19
App Manifest............................................................................................................................ 6-28
App Icons................................................................................................................................. 6-29

Lab 6: Android Application Layouts, Styles, and Themes.................................................... 6-35


Create Your Application Layout......................................................................................... 6-36
Configure Your Styles and Themes................................................................................... 6-36
Configure Your App Icon ................................................................................................... 6-46
Android ™ Application Development AND-X01

Lesson 7: Snackbar, Activities, Android Intent, Alert


Dialog and Android Notifications

Snackbar Class........................................................................................................................ 7-1


What is an Activity?................................................................................................................. 7-7
Activity Lifecycle..................................................................................................................... 7-8
Managing the activity lifecycle........................................................................................... 7-9
Android Intent.......................................................................................................................... 7-16
Navigating Between Activities........................................................................................... 7-18
Passing Data between Activities........................................................................................ 7-25
Android Alert Dialog................................................................................................................ 7-29
Android Notifications.............................................................................................................. 7-37
Creating an Android Notification........................................................................................ 7-39
Notification Channel........................................................................................................... 7-40

Lab 7: Creating a Mail Schedule Pickup App........................................................................ 7-53

Lesson 8: Android Widgets


Progress Bar............................................................................................................................ 8-1
Seek Bar................................................................................................................................... 8-8
Date and Time Picker Dialogs................................................................................................ 8-15
Creating a Date Picker........................................................................................................ 8-15
Creating a Ttime Picker..................................................................................................... 8-19
Calendar View ......................................................................................................................... 8-21
Web View.................................................................................................................................. 8-23
Rating Bar................................................................................................................................. 8-28
Video View .............................................................................................................................. 8-31
Texture View............................................................................................................................ 8-36

Lab 8: Creating a Pizza Schedule a App................................................................................ 8-39


Configuring the Pizza Size using SeekBar widget
Configuring the order Pickup date using the Date Picker Class
Configuring the order Pickup time using the Time Picker Class
Pass the app order details to another activity using the Intent class
Using the Rating Bar widget to leave the app user review
Android ™ Application Development

Lesson 9: Android Navigation Components


Menus ...................................................................................................................................... 9-1
Bottom AppBar ....................................................................................................................... 9-7
Recycler View ......................................................................................................................... 9-16
SearchView ............................................................................................................................ 9-35
TabLayout and ViewPager ..................................................................................................... 9-46
Spinner ................................................................................................................................... 9-56
Drawer ..................................................................................................................................... 9-63

Lab 09: Creating Navigation Drawer in Android App .......................................................... 9-64

Lesson 10: Firebase Authentication and Database

Introduction............................................................................................................................. 10-1
What is the JSON?.................................................................................................................. 10-2
How does Firebase Database work?..................................................................................... 10-2
Firebase Authentication (Signup and Login Android App).................................................. 10-3
Configure your App to use Firebase Services...................................................................... 10-8
Configuring Firebase Authentication.................................................................................... 10-15
Login to App Using a Firebase User Accounts ................................................................ 10-23
Logout Configuration ......................................................................................................... 10-24
Using Firebase Assistant with Android Studio..................................................................... 10-26
Firebase Database.................................................................................................................. 10-27
Real Time Database................................................................................................................ 10-28
Cloud Firestore Database ...................................................................................................... 10-37

Lab 10: Firebase Authentication and Database ................................................................... 10-44


Configure your App to use Firebase Services ................................................................. 10-52
Adding Firebase to your Android App .............................................................................. 10-54
Configuring User Authentication Using Firebase Authentication ................................. 10-63
Creating a Firebase Cloud Database................................................................................ 10-64
Retrieving Data | Firebase Cloud Database ..................................................................... 10-70
Android ™ Application Development AND-X01

Lesson 11: Location-Aware Apps: Using GPS and Google Maps


Introduction ............................................................................................................................ 11-1
What is GPS and how does it work? ..................................................................................... 11-1
Latitude and Longitude...................................................................................................... 11-1
Camera Position................................................................................................................. 11-2
Adding Google Maps to an Android app ............................................................................... 11-4
Map Fragment .................................................................................................................... 11-6
Getting a Google API key ................................................................................................... 11-7
Adding a Google Map Marker............................................................................................ 11-14
Capture a User’s Location on Google Maps ..................................................................... 11-20
Reverse Geolocation on Google Map ............................................................................... 11-30
Retrieving a Readable Address on Google Map............................................................... 11-31

Lab11: Location-Aware Apps Using a GPS and Google Maps............................................ 11-41


Creating an App Interface and Configuring Google Services Prerequisites ................ 11-42
Creating a Google Map Fragment .................................................................................... 11-43
Getting a Google API key .................................................................................................. 11-43
Configuring Your App to Use Your Google API Key and User App’s Permission.......... 11-47
Adding Google Map and Capturing Users' Location....................................................... 11-48

Lesson 12: App Testing and Publishing

Testing and Feedback Your App............................................................................................ 12-1


Setting up a Test Environment .......................................................................................... 12-5
Usability Testing by Participants ....................................................................................... 12-5
Starting Your Test Session ............................................................................................... 12-6
Analyzing Your Test ........................................................................................................... 12-7
Firebase Test Lab ............................................................................................................... 12-7
Publishing Android App on Google Play Store ..................................................................... 12-7
Preparing your app for release .......................................................................................... 12-8
Publish App on Google Play Store .................................................................................... 12-13

You might also like