Book Image

Android 5 Programming by Example

By : Kyle Mew
Book Image

Android 5 Programming by Example

By: Kyle Mew

Overview of this book

<p>Android is a mobile operating system that runs on a staggering number of smart phones and tablets. Android offers developers the ability to build rich and innovative applications written using the Java programming language.</p> <p>Beginning with detailed instructions on how to install and configure the Android SDK, Studio, and Virtual Device Manager, the book moves on to creating a simple, but working, "Hello World" app that can be run on a real device or emulator.</p> <p>The book then moves on to layouts and the visual design of Lollipop apps. A new app is begun to demonstrate this and expanded as we move further, and, once material design has been introduced, the book moves on to the Java coding aspect and how to write code that responds to user interactions via callback methods such as touchscreen gesture listeners. No book on Lollipop APIs would be complete without explaining how the new Android TV, Wear, and Auto SDK tools work and how they can be utilized to either create new apps or convert those originally written for other platforms.</p> <p>The book concludes by demonstrating how to package and deploy your finished app on the Google Play store.</p>
Table of Contents (17 chapters)
Android 5 Programming by Example
About the Author
About the Reviewers

Chapter 1. Setting Up the Development Environment

Android 5 is the most significant update available at the present time, since its platform was created in 2009. It introduced a completely reworked user interface and thousands of new APIs, including the all new camera APIs. Android 5 also incorporates exciting, new, power-saving technologies, and improved app performance.

In this chapter, we will install and configure all the development tools required for building an Android app. These will include the Android Studio and Android SDK, various platform specific tools and system images, and an Android Virtual Device. Once our environment is properly set up, we will create a simple "Hello World" project and test it on a mobile device, as well as on an emulator. This exercise will give us a good opportunity to become acquainted with some of the most widely used elements of our development environment, as well as providing a quick, but useful, demonstration of how an Android Studio project is put together.

In this chapter, we will:

  • Understand what is new and different about Android 5

  • Download and install the Android Studio and SDK

  • Install the latest SDK tools, platform-tools, and build-tools

  • Install the Lollipop platform and system images

  • Create a basic "Hello World" project

  • Run the app on a handset

  • Configure an Android Virtual Device (AVD)

  • Run the app on the AVD emulator

Before we start, it's worth while taking a closer look at Android 5 itself, and see what sets it apart from other Android versions, and what it has to offer to us, as developers.