Android Programming for Beginners

Learn Android application development with this accessible tutorial that takes you through Android and Java programming with practical and actionable steps.

Android Programming for Beginners

Learning
John Horton

36 customer reviews
Learn Android application development with this accessible tutorial that takes you through Android and Java programming with practical and actionable steps.
$39.99
$49.99
RRP $39.99
RRP $49.99
eBook
Print + eBook

Instantly access this course right now and get the skills you need in 2017

With unlimited access to a constantly growing library of over 4,000 eBooks and Videos, a subscription to Mapt gives you everything you need to get that next promotion or to land that dream job. Cancel anytime.

Free Sample

Book Details

ISBN 139781785883262
Paperback698 pages

Book Description

Android is the most popular OS in the world. There are millions of devices accessing tens of thousands of applications. It is many people's entry point into the world of technology; it is an operating system for everyone. Despite this, the entry-fee to actually make Android applications is usually a computer science degree, or five years’ worth of Java experience.

Android Programming for Beginners will be your companion to create Android applications from scratch—whether you’re looking to start your programming career, make an application for work, be reintroduced to mobile development, or are just looking to program for fun. We will introduce you to all the fundamental concepts of programming in an Android context, from the Java basics to working with the Android API. All examples are created from within Android Studio, the official Android development environment that helps supercharge your application development process.

After this crash-course, we’ll dive deeper into Android programming and you’ll learn how to create applications with a professional-standard UI through fragments, make location-aware apps with Google Maps integration, and store your user’s data with SQLite. In addition, you’ll see how to make your apps multilingual, capture images from a device’s camera, and work with graphics, sound, and animations too.

By the end of this book, you’ll be ready to start building your own custom applications in Android and Java.

Table of Contents

Chapter 1: The First App
How Java and Android work together
The development environment
What makes an Android app
Our first Android app
FAQ
Summary
Chapter 2: Java – First Contact
Examining the log output
Improving our app and deploying again
Meet Java
FAQ
Summary
Chapter 3: Exploring Android Studio
The Android Studio guided tour
FAQ
Summary
Chapter 4: Designing Layouts
Exploring Android UI design
Structure of a UI design
Summary
Chapter 5: Real-World Layouts
Building a real-world UI
Summary
Chapter 6: The Life and Times of an Android App
Introduction to the Android lifecycle
A simplified explanation of the Android lifecycle
Lifecycle phases – what we need to know
Lifecycle phases – what we need to do
The lifecycle demonstration app
The structure of Java code – revisited
Summary
Chapter 7: Coding in Java Part 1 – Variables, Decisions, and Loops
Java is everywhere
Syntax and jargon
More code comments
Storing and using data with variables
Changing values in variables with operators
Expressing yourself demo app
Decisions
Repeating code with loops
Summary
Chapter 8: Coding in Java Part 2 – Methods
Methods revisited
Scope and variables revisited
FAQ
Further reading
Summary
Chapter 9: Object-Oriented Programming
Important memory management warning
Introducing OOP
Taking a look at the code for a class
The basic classes mini app
Remember that encapsulation thing?
Encapsulation and static methods mini app
OOP and inheritance
The inheritance mini app
Polymorphism
FAQ
Summary
Chapter 10: Everything's a Class
All Android UI elements are classes too
FAQ
Summary
Chapter 11: Widget Mania
Exploring Android UI objects
Exploring the palette
Android permissions and Marshmallows
The Widget exploration mini app
Summary
Chapter 12: Having a Dialogue with the User
Dialog windows
About the Note To Self app
Building the project and gathering resources
Coding the Note class
Implementing the dialog designs
Coding the dialog boxes
Summary
Chapter 13: Handling and Displaying Arrays of Data
A random diversion
Handling large amount of data with arrays
A simple array example mini app
Getting dynamic with arrays
Entering the nth dimension with arrays
ArrayLists
Arrays and ArrayLists are polymorphic
ListView and BaseAdapter
FAQ
Summary
Chapter 14: Handling and Displaying Notes in Note To Self
Note To Self continued
Improvements in Note To Self
FAQ
Summary
Chapter 15: Android Intent and Persistence
Good Intents
Adding a settings page to the Note To Self app
Persisting data with SharedPreferences
Making the Note To Self app's settings persist
More advanced persistence
Backing up user data in Note To Self
FAQ
Summary
Chapter 16: UI Animations
Animations in Android
The Animations Demo app – introducing SeekBar
Adding animations to Note To Self
FAQ
Summary
Chapter 17: Sound FX and Supporting Different Versions of Android
Supporting multiple versions of Android
Introducing the Spinner widget
Sound FX touches to Note To Self
Deleting a note – introducing OnLongClick
FAQ
Summary
Chapter 18: Design Patterns, Fragments, and the Real World
Introducing the model-view-controller pattern
The imperfections of Note To Self revisited
Android design guidelines
Real-world apps
The device detection mini app
Configuration qualifiers
Using configuration qualifiers – mini app
Fragments
Our first working Fragment mini app
Fragment reality check
FAQ
Summary
Chapter 19: Using Multiple Fragments
Using singletons for the model layer
Inter-Fragment communications – interfaces revisited
The dual-Fragment address book mini app
FAQ
Summary
Chapter 20: Paging and Swiping
Building an image gallery/slider app
Building a Fragment pager/slider app
Summary
Chapter 21: Navigation Drawer and Where It's Snap
Introducing the navigation drawer
The Where it's snap app
Summary
Chapter 22: Capturing Images
Capturing images using the camera
The capturing images mini app
Where it's snap – coding the capture Fragment
Summary
Chapter 23: Using SQLite Databases in Our Apps
Database 101
The SQL syntax primer
The Android SQLite API
The database mini app
Summary
Chapter 24: Adding a Database to Where It's Snap
The Photo class
Handling the SQLite database
Saving a new photo from the capture fragment
Displaying a photo from the database
Coding the communications interface
Coding TitlesFragment
Coding TagsFragment
Coding the fragment communications in MainActivity
Running the app so far
Summary
Chapter 25: Integrating Google Maps and GPS Locations
Global Positioning System
Where in the world – the GPS mini app
The Google Maps mini app
Summary
Chapter 26: Upgrading SQLite – Adding Locations and Maps
Adding locations and maps to Where it's Snap
Updating ViewFragment
Adding location permissions
Testing the new map feature
Summary
Chapter 27: Going Local – Hola!
The Localization mini app
Localizing the Where it's snap app
Summary
Chapter 28: Threads, Touches, Drawing, and a Simple Game
Threads
Problems with threads
Drawing with canvas and paint
Android Canvas demo app
Handling touches
A simple game engine
Building a simple game of Pong
Summary
Chapter 29: Publishing Apps
Preparing to publish
Building the publishable APK file
Publishing the app
Marketing
More to see
Summary
Chapter 30: Before You Go
What next
Goodbye and thank you

What You Will Learn

  • Master the fundamentals of coding Java for Android
  • Install and set up your Android development environment
  • Build functional user interfaces with the Android Studio visual designer
  • Add user interaction, data captures, sound, and animation to your apps
  • Manage your apps’ data using the built-in Android SQLite database
  • Find out about the design patterns used by professionals to make top-grade applications
  • Build, deploy, and publish real Android applications to the Google Play marketplace

Authors

Table of Contents

Chapter 1: The First App
How Java and Android work together
The development environment
What makes an Android app
Our first Android app
FAQ
Summary
Chapter 2: Java – First Contact
Examining the log output
Improving our app and deploying again
Meet Java
FAQ
Summary
Chapter 3: Exploring Android Studio
The Android Studio guided tour
FAQ
Summary
Chapter 4: Designing Layouts
Exploring Android UI design
Structure of a UI design
Summary
Chapter 5: Real-World Layouts
Building a real-world UI
Summary
Chapter 6: The Life and Times of an Android App
Introduction to the Android lifecycle
A simplified explanation of the Android lifecycle
Lifecycle phases – what we need to know
Lifecycle phases – what we need to do
The lifecycle demonstration app
The structure of Java code – revisited
Summary
Chapter 7: Coding in Java Part 1 – Variables, Decisions, and Loops
Java is everywhere
Syntax and jargon
More code comments
Storing and using data with variables
Changing values in variables with operators
Expressing yourself demo app
Decisions
Repeating code with loops
Summary
Chapter 8: Coding in Java Part 2 – Methods
Methods revisited
Scope and variables revisited
FAQ
Further reading
Summary
Chapter 9: Object-Oriented Programming
Important memory management warning
Introducing OOP
Taking a look at the code for a class
The basic classes mini app
Remember that encapsulation thing?
Encapsulation and static methods mini app
OOP and inheritance
The inheritance mini app
Polymorphism
FAQ
Summary
Chapter 10: Everything's a Class
All Android UI elements are classes too
FAQ
Summary
Chapter 11: Widget Mania
Exploring Android UI objects
Exploring the palette
Android permissions and Marshmallows
The Widget exploration mini app
Summary
Chapter 12: Having a Dialogue with the User
Dialog windows
About the Note To Self app
Building the project and gathering resources
Coding the Note class
Implementing the dialog designs
Coding the dialog boxes
Summary
Chapter 13: Handling and Displaying Arrays of Data
A random diversion
Handling large amount of data with arrays
A simple array example mini app
Getting dynamic with arrays
Entering the nth dimension with arrays
ArrayLists
Arrays and ArrayLists are polymorphic
ListView and BaseAdapter
FAQ
Summary
Chapter 14: Handling and Displaying Notes in Note To Self
Note To Self continued
Improvements in Note To Self
FAQ
Summary
Chapter 15: Android Intent and Persistence
Good Intents
Adding a settings page to the Note To Self app
Persisting data with SharedPreferences
Making the Note To Self app's settings persist
More advanced persistence
Backing up user data in Note To Self
FAQ
Summary
Chapter 16: UI Animations
Animations in Android
The Animations Demo app – introducing SeekBar
Adding animations to Note To Self
FAQ
Summary
Chapter 17: Sound FX and Supporting Different Versions of Android
Supporting multiple versions of Android
Introducing the Spinner widget
Sound FX touches to Note To Self
Deleting a note – introducing OnLongClick
FAQ
Summary
Chapter 18: Design Patterns, Fragments, and the Real World
Introducing the model-view-controller pattern
The imperfections of Note To Self revisited
Android design guidelines
Real-world apps
The device detection mini app
Configuration qualifiers
Using configuration qualifiers – mini app
Fragments
Our first working Fragment mini app
Fragment reality check
FAQ
Summary
Chapter 19: Using Multiple Fragments
Using singletons for the model layer
Inter-Fragment communications – interfaces revisited
The dual-Fragment address book mini app
FAQ
Summary
Chapter 20: Paging and Swiping
Building an image gallery/slider app
Building a Fragment pager/slider app
Summary
Chapter 21: Navigation Drawer and Where It's Snap
Introducing the navigation drawer
The Where it's snap app
Summary
Chapter 22: Capturing Images
Capturing images using the camera
The capturing images mini app
Where it's snap – coding the capture Fragment
Summary
Chapter 23: Using SQLite Databases in Our Apps
Database 101
The SQL syntax primer
The Android SQLite API
The database mini app
Summary
Chapter 24: Adding a Database to Where It's Snap
The Photo class
Handling the SQLite database
Saving a new photo from the capture fragment
Displaying a photo from the database
Coding the communications interface
Coding TitlesFragment
Coding TagsFragment
Coding the fragment communications in MainActivity
Running the app so far
Summary
Chapter 25: Integrating Google Maps and GPS Locations
Global Positioning System
Where in the world – the GPS mini app
The Google Maps mini app
Summary
Chapter 26: Upgrading SQLite – Adding Locations and Maps
Adding locations and maps to Where it's Snap
Updating ViewFragment
Adding location permissions
Testing the new map feature
Summary
Chapter 27: Going Local – Hola!
The Localization mini app
Localizing the Where it's snap app
Summary
Chapter 28: Threads, Touches, Drawing, and a Simple Game
Threads
Problems with threads
Drawing with canvas and paint
Android Canvas demo app
Handling touches
A simple game engine
Building a simple game of Pong
Summary
Chapter 29: Publishing Apps
Preparing to publish
Building the publishable APK file
Publishing the app
Marketing
More to see
Summary
Chapter 30: Before You Go
What next
Goodbye and thank you

Book Details

ISBN 139781785883262
Paperback698 pages
Read More
From 36 reviews

Read More Reviews