Introduction - Android Application Development For Dummies, 3rd Edition (2015)

Android Application Development For Dummies, 3rd Edition (2015)


Welcome to Android Application Development For Dummies!

When Android was acquired by Google in 2005 (yes, Android was a start‐up company at one point), a lot of people didn’t have much interest in it because Google hadn’t yet entered the mobile space. Fast‐forward to a few years later, when Google announced its first Android phone: the G1. It was the start of something huge.

The G1 was the first publicly released Android device. It didn’t match the rich feature set of the iPhone at the time, but a lot of people believed in the platform. As soon as Donut (Android 1.6) was released, it was evident that Google was putting some effort into the product. Immediately after version 1.6 was released, talk of 2.0 was already on the horizon.

Today, we’re on version 5.0 of the Android platform, with no signs that things are slowing down. Without doubt, this is an exciting time in Android development.

About This Book

Android Application Development For Dummies is a beginner’s guide to developing Android applications. You don’t need any Android application development experience under your belt to get started.

The Android platform is a deviceindependent platform, which means that you can develop applications for various devices. These devices include, but aren’t limited to phones, watches, tablets, cars, e‐book readers, netbooks, televisions, and GPS devices.

Finding out how to develop for the Android platform opens a large variety of development options for you. This book distills hundreds, if not thousands, of pages of Android documentation, tips, tricks, and tutorials into a short, digestible format that allows you to springboard into your future as an Android developer. This book isn’t a recipe book, but it gives you the basic knowledge to assemble various pieces of the Android framework to create interactive and compelling applications.

Conventions Used in This Book

Throughout the book, you use the Android framework classes, and you’ll create Java classes and XML files.

Code examples in this book appear in a monospace font so that they stand out from other text in the book. This means that the code you’ll see looks like this:

public class MainActivity

Java is a high‐level programming language that is case‐sensitive, so be sure to enter the text into the editor exactly as you see it in the book. The examples follow standard Java conventions so you can transition easily between the book examples and the example code provided by the Android Software Development Kit (SDK). All class names, for example, appear in PascalCase format.

All the URLs in the book appear in monospace font as well:

Foolish Assumptions

To begin programming with Android, you need a computer that runs one of the following operating systems:

· Windows 2003, Vista, 7 or 8

· Mac OS X 10.8.5 or later

· Linux GNOME or KDE

You also need to download Android Studio (which is free) and the Java Development Kit (or JDK, which is also free), if you don’t already have them on your computer. Chapter 2 outlines the entire installation process for all the tools and frameworks.

Because Android applications are developed in the Java programming language, you need to understand the Java language. Android also uses XML quite heavily to define various resources inside the application, so you should understand XML too. You don’t have to be an expert in these languages, however.

You don’t need a physical Android device, because all the applications you build in this book will work on an emulator.

How This Book Is Organized

Android Application Development For Dummies has five parts, described in the following sections.

Part I: Getting Started with Your First Android Application

Part I introduces the tools and frameworks that you use to develop Android applications. It also introduces the various SDK components and shows you how they’re used in the Android ecosystem.

Part II: Building and Publishing Your First Android Application

Part II introduces you to building your first Android application: the Silent Mode Toggle application. After you build the initial application, you create an app widget for the application that you can place on the Home screen of an Android device. Then you publish your application to the Google Play Store.

Part III: Creating a FeatureRich Application

Part III takes your development skills up a notch by walking you through the construction of the Tasks application, which allows users to create various tasks with reminders. You implement an SQLite backed content provider in this multiscreen application. You also see how to use the Android status bar to create notifications that can help increase the usability of your application.

Part IV: Android Is More than Phones

Part IV takes the phone app you built in Part III and tweaks it to work on lots of other devices, including tablets, wearables, televisions, and the Amazon Fire.

Part V: The Part of Tens

Part V gives you a tour of sample applications that prove to be stellar launching pads for your Android apps, and useful Android libraries that can make your Android development career a lot easier.

Icons Used in This Book

This icon indicates a useful pointer that you shouldn’t skip.

This icon represents a friendly reminder about a vital point you should keep in mind while proceeding through a particular section of the chapter.

This icon signifies that the accompanying explanation may be informative but isn’t essential to understanding Android application development. Feel free to skip these snippets, if you like.

This icon alerts you to potential problems that you may encounter along the way. Read and remember these tidbits to avoid possible trouble.

This icon signifies that you’ll find additional relevant content at

Beyond the Book

In addition to the content in this book, you’ll find some extra content available at the website:

· The Cheat Sheet for this book at

· Online articles covering additional topics at

Here you’ll find the articles referred to on the page that introduces each part of the book. So, feel free to visit You’ll feel at home there . . . find coffee and donuts . . . okay, maybe not the coffee and donuts, but you can find cool supplementary information about things we couldn’t fit into the book, such as testing, GPS location tracking, voice control, and other fun topics.

· Updates to this book, if any, at

· Don’t want to type all the code in the book? You can download it from the book’s website at

· If there are ever updates to this book, you can find them at