Our Ironclad Guarantee
You must be satisfied. Try our print books for 30 days or our eBooks for 14 days. If they aren't the best you've ever used, you can return the books or cancel the eBooks for a prompt refund. No questions asked!
If you know how to program in Java, this is the first book you should buy for learning how to develop Android apps the way the pros do; it'll save you a lot of time and frustration. First, it shows how to set up a professional development environment using Android Studio. Then, it presents a series of complete Android apps that illustrate key skills…working with fragments, services, broadcast receivers, SQLite databases, content providers, Google Maps, and more!
Go to our instructor’s site to learn more about this book and its instructor’s materials.
I like the fact that the book approaches the subject by using example apps as the theme of study, and working through the skills incrementally from easy to difficult. These case-study apps are complete apps by themselves and are worthy of being in the Android app stores.”
This book is a great way to get started with Android programming. Here’s a brief rundown of its sections.
In four chapters, you’ll quickly master the basics of Android programming. That includes:
You’ll learn the Android essentials by enhancing the Tip Calculator app that you developed in section 1. Those essentials include:
You’ll learn how to develop a News Reader app that displays current news to the user. Along the way, you’ll learn:
You’ll learn how develop a Task List app that stores one or more to-do lists. Along the way, you’ll learn:
You’ll learn some advanced skills for developing and deploying apps including:
This book is for anyone who wants to learn professional skills for developing Android apps. The only prerequisite is a basic understanding of Java, roughly equivalent to chapters 1 through 18 of Murach's Beginning Java with NetBeans or Murach's Beginning Java with Eclipse. Once you have those Java skills, our Android book will work for you, even if you have absolutely no experience developing mobile apps.
You can download all of the software that you need for this book for free from the Internet:
Appendixes A, B, and C show how to install and configure this software on Windows, Mac OS X, and Linux.
If necessary, you can use an emulator to run and test Android apps; this book shows you how. Unfortunately, emulators tend to run extremely slowly on most computers. As a result, we recommend using an actual Android device such as a smartphone or tablet whenever possible.
Over 95% of all Android devices use Android 4.0 (API 15) or later, and this book reflects that. The only app that won’t work with Android 4.0 is the News Reader app, which is designed to work with Android 4.1 (API 16) and later.
At the time this book was written, the most recent release was Android 6.0 (API 23). But since Android is backwards-compatible, all of the apps will continue to work under subsequent releases, too.
This book shows how to use Android Studio to code, test, and debug apps. Although there are other IDEs for working with Android, today Android Studio is the official IDE for Android development. It’s also available for free, and it runs on all operating systems.
As you read our Android book, you may discover that your Java skills aren’t as strong as they ought to be. In that case, we recommend one of our Java books.
Murach's Beginning Java (there’s one edition for Eclipse and one for NetBeans) is designed for programming novices. It moves at the right pace for beginners and gives you a full set of core Java skills.
But if Java isn’t your first language, you may prefer Murach’s Java Programming (4th Edition). It moves at a faster pace, and goes into more depth and breadth, especially about developing desktop applications.
No matter which you choose, these books will get you up-to-speed with the core Java skills that you need for developing Android apps.
“As someone who first learnt Android programming from a confusing jumble of resources strewn across the Internet - from Google's tutorials to StackOverflow questions to any number of random blog posts that search threw up - I can honestly say I wish I had read this book first, because it would have saved me an awful amount of time and confusion.
“The book takes the reader along a gentle basics-to-advanced learning path that quite accurately addresses at every step what a new developer should learn next, both on the front end and back end.”
- Karthik Shiraly, CodeRanch
“After going through the entire book, I feel this really gives people an end-to-end coverage of getting into android application making. It is geared towards folks looking to get a handle on a complex topic; walking through the chapters it really presents material in a great fashion. The exercise and homework questions are on point, the writing clear, and the example applications germane and useful. A perfect book for someone who is stuck on the hurdle of ‘where do I start.’”
- Jeremy Johnson, Dream in Code
“Taking into consideration the well-structured content, clear and concise writing style, practical code samples and exercises, I think this book serves as an excellent learning tool to those who are getting their feet wet in the world of Android programming or who just want to update their core Android programming skills.”
- Jason Ong, ASPNETWorld
“Want to get into Android programming fast and seamlessly? This book is all you need to create an application from scratch and publish it successfully to Google Play Market.”
- Igor Rolinsky, Chicago Java Users Group
To view the table of contents for this book in a PDF: Table of Contents
Click on any chapter title to display or hide its content.
Types of devices
Types of apps
A brief history
Versions
System architecture
How apps are compiled and run
How to work with the Welcome page
How to open an existing project
How to view the user interface for an app
How to view the code for an app
How to run an app on a physical device
How to run an app on an emulator
The user interface
The user interface
How to create a new project
How to work with a layout
How to add widgets to a layout
How to set the display text
How to work with resource files
How to set properties
Common properties
The XML for the user interface
How to work with an activity
How to remove the v7 appcompat support library
How to get references to widgets
How to handle the EditorAction event
How to get and set the text for widgets
The lifecycle of an activity
How to save and restore values
The Java code for the app
How to work with the Gradle build script
How to work with dependencies
How to work with the Android manifest
How to set the launcher icon for an app
How to use the documentation for the Android API
Typical test phases
How to check the layout
How to handle runtime errors
How to use LogCat
How to use toasts
How to set and remove breakpoints
How to step through code
How to inspect variables
How to inspect the stack trace
How to create an emulator for a tablet
How to create an emulator for a phone with a hard keyboard and DPad
A summary of layouts
A summary of widgets
The View hierarchy
How to use a linear layout
How to use a table layout
How to use a frame layout
How to nest layouts
How to provide a landscape layout
How to use editable text views
How to use check boxes
How to use radio buttons
How to use spinners
How to use seek bars
How to display images
How to show and hide widgets
How to add scroll bars
How to display web content
High-level events
Low-level events
How to use the current class as the listener
How to use a named class as the listener
How to use an anonymous class as the listener
How to use an anonymous inner class as the listener
When to use each technique
How to handle events for check boxes and radio buttons
How to handle events for radio groups
How to handle events for spinners
How to handle events for seek bars
How to handle Key events
How to handle Touch events
The user interface
The Java code for the activity
Three common themes
How to supply different themes for different APIs
How to convert an existing project to the AppCompat theme
How to define a style
How to apply a style
How to create a style sheet
How to modify a built-in theme
How to modify the AppCompat theme
How to modify a theme depending on the API
How to modify the text appearance for a theme
A summary of built-in themes
How to apply themes
How to define colors
How to apply colors
An introduction to menus
How to define a menu
How to display an options menu
How to handle option menu events
How to start a new activity
An introduction to preferences
How to define preferences
How to display preferences
How to get preferences
How to use preferences
How to group preferences
How to enable and disable preferences
How to use Java to work with preferences
Single-pane and multi-pane layouts
The lifecycle methods of a fragment
How to create the layout for a fragment
How to create the class for a fragment
How to display a fragment in an activity
How to create a preference fragment
How to display a preference fragment in an activity
How to add multiple fragments to a layout
How to detect screen width
How to control the soft keyboard
How to get a reference to a fragment
How to replace one fragment with another
The user interface
The XML for an RSS feed
How threads work
How to execute asynchronous tasks
How to execute timed tasks
How to update the UI thread
How to download a file from the Internet
How to parse an XML file
The RSSFeedHandler class
The RSSFeed class
The RSSItem class
How to create the layout for a list view
How to use an adapter to display data in a list view
How to handle events for an adapter
How to pass data between activities
How to view a URL in a web browser
How to dial or call a phone number
The activity_items layout
The ItemsActivity class
The FileIO class
The activity_item layout
The ItemActivity class
How to define the Application object
How to register the Application object
How to use the Application object
The lifecycle of a service
How to create a service
How to register a service
How to start and stop a service
How to use threads with services
How to test a service
How to view all services
How notifications work
How to create a pending intent
How to create a notification
How to display or remove a notification
How to check if a network connection is available
The NewsReaderService class
The ItemsActivity class
The FileIO class
A summary of the system broadcasts
How to code a receiver for the boot completed broadcast
How to code a receiver for the connectivity changed broadcast
How to create and send a custom broadcast
How to code a receiver for a custom broadcast
The user interface for the Task List app
An introduction to SQLite
An introduction to the Task List database
The business objects for the Task List app
How to define the constants for a database
How to define the SQL statements that create a database
How to create or upgrade a database
How to open and close a database connection
How to retrieve multiple rows from a table
How to retrieve a single row from a table
How to get data from a cursor
How to insert, update, and delete rows
How to test the database class
How to clear test data from a device
How to work with the database file
How to use DB Browser for SQLite
How to add the TabManager class to your project
The layout for an activity that displays tabs
The class for an activity that displays tabs
The class for a fragment that displays tab content
A layout for a list view item
A class that extends the layout for a list view item
A class for a custom adapter
A class for a fragment that uses a custom adapter
The user interface
The activity_task_list menu
The TaskListActivity class
The activity_add_edit and spinner_list layout
The activity_add_edit menu
The AddEditActivity class
URIs for content providers
MIME types for content providers
How to add supporting methods to the database class
How to start a content provider class
How to provide for querying
How to provide for inserting rows
How to provide for updating rows
How to provide for deleting rows
How to register a content provider
How to use a custom content provider
How to use a built-in content provider
How to import the dialog class and interface
How to build and show the dialog box
The user interface
The XML for the layouts
The Java code for the activity
A Home screen that has app widgets
How to remove app widgets
How to add app widgets
How to create the layout
How to modify the database class
How to create the provider class
How to configure an app widget
How to register an app widget
How to test an app widget
How distribution works
How monetization works
How to prepare an app for release
How to create the signed APK file
How to distribute via a website
How distribute via email
How to set up a publisher account
How to use the Developer Console to publish an app
How to view the listing for an app
The user interface for the Run Tracker app
An introduction to determining location
An introduction to maps
An introduction to the Google Maps Android API
How to create a new Google Maps project
How to add Google Play services to an existing project
How to get a Google Maps API key
How to set permissions and features
How to connect to Google Play services
How to get the current location
How to handle a failed connection
How to get location updates
How to make sure GPS is enabled
How to add a map fragment to a layout
How to display a map
How to zoom in on a location
How to add markers
How to add lines
The activity_run_map layout
The RunMapActivity class
The RunTrackerService class
To show you how well this book works, this free chapter introduces you to the concepts and terms that you need for developing Android apps. Then, it shows how to use Android Studio to work with an existing project. This gives you hands-on experience working with the book apps that you can download below.
Chapter 1 PDF (1.7Mb) Download Now
Since Murach’s Android Programming (2nd Edition) was published in 2015, there have been some significant improvements to Android Studio that impact chapters 1 and 2. Most of this document attempts to show you how to take advantage of these improvements. We recommend reading it after you’ve read pages 1-15 of chapter 1.
Android Studio Update for 2017 PDF (1.7Mb) Download Now
This download includes:
Appendixes A, B, and C show how to install this source code on Windows, Mac OS X, and Linux.
Exe file for Windows (15.1Mb) Download Now
Zip file for any system (14.9Mb) Download Now
To view the "Frequently Asked Questions" for this book in a PDF, just click on this link: View the questions
Then, if you have any questions that aren't answered here, please email us. Thanks!
To view the corrections for this book in a PDF, just click on this link: View the corrections
Then, if you find any other errors, please email us so we can correct them in the next printing of the book. Thank you!
For orders and customer service:
1-800-221-5528
Weekdays, 8 to 4 Pacific Time
If you're a college instructor who would like to consider a book for a course, please visit our website for instructors to learn how to get a complimentary review copy and the full set of instructional materials.