Book Image

Augmented Reality for Android Application Development

Book Image

Augmented Reality for Android Application Development

Overview of this book

Augmented Reality offers the magical effect of blending the physical world with the virtual world, which brings applications from your screen into your hands. AR redefines advertising and gaming, as well as education. It will soon become a technology that will have to be mastered as a necessity by mobile application developers. Augmented Reality for Android Application Development enables you to implement sensor-based and computer vision-based AR applications on Android devices. You will learn about the theoretical foundations and practical details of implemented AR applications, and you will be provided with hands-on examples that will enable you to quickly develop and deploy novel AR applications on your own. Augmented Reality for Android Application Development will help you learn the basics of developing mobile AR browsers, how to integrate and animate 3D objects easily with the JMonkeyEngine, how to unleash the power of computer vision-based AR using the Vuforia AR SDK, and will teach you about popular interaction metaphors. You will get comprehensive knowledge of how to implement a wide variety of AR apps using hands-on examples. This book will make you aware of how to use the AR engine, Android layout, and overlays, and how to use ARToolkit. Finally, you will be able to apply this knowledge to make a stunning AR application.
Table of Contents (14 chapters)
Augmented Reality for Android Application Development
About the Authors
About the Reviewers
Free Chapter
Augmented Reality Concepts and Tools


Augmented Reality offers the magic effect of blending the physical world with the virtual world and brings applications from your screen into your hands. Augmented Reality redefines advertising and gaming as well as education in an utterly new way; it will become a technology that needs to be mastered by mobile application developers. This book enables you to practically implement sensor-based and computer vision-based Augmented Reality applications on Android. Learn about the theoretical foundations and practical details of implemented Augmented Reality applications. Hands-on examples will enable you to quickly develop and deploy novel Augmented Reality applications on your own.

What this book covers

Chapter 1, Augmented Reality Concepts and Tools, introduces the two major Augmented Reality approaches: sensor-based and computer vision-based Augmented Reality.

Chapter 2, Viewing the World, introduces you to the first basic step in building Augmented Reality applications: capturing and displaying the real world on your device.

Chapter 3, Superimposing the World, helps you use JMonkeyEngine to overlay high-fidelity 3D models over the physical world.

Chapter 4, Locating in the World, provides the basic building blocks to implement your own Augmented Reality browser using sensors and GPS.

Chapter 5, Same as Hollywood - Virtual on Physical Objects, explains you the power of the VuforiaTM SDK for computer vision-based AR.

Chapter 6, Make It Interactive - Create the User Experience, explains how to make Augmented Reality applications interactive. Specifically, you will learn how to develop ray picking, proximity-based interaction, and 3D motion gesture-based interaction.

Chapter 7, Further Reading and Tips, introduces more advanced techniques to improve any AR application's development.

What you need for this book

If you want to develop Augmented Reality applications for Android, you can share a majority of tools with regular Android developers. Specifically, you can leverage the power of the widely supported Android Developer Tools Bundle (ADT Bundle). This includes:

  • The Eclipse Integrated Development Environment (IDE)

  • The Android Developer Tools (ADT) plugin for Eclipse

  • The Android platform for your targeted devices (further platforms can be downloaded)

  • The Android emulator with the latest system image

Besides this standard package common to many Android development environments, you will need:

  • A snapshot of JMonkeyEngine (JME), Version 3 or higher

  • Qualcomm® VuforiaTM SDK (VuforiaTM), version 2.6 or higher

  • Android Native Development Kit (Android NDK), version r9 or higher

Who this book is for

If you are a mobile application developer for Android and want to get to the next level of mobile app development using Augmented Reality, then this book is for you. It is assumed that you are familiar with Android development tools and deployment. It is beneficial if you have experience on working with external libraries for Android, as we make use of JMonkeyEngine and the VuforiaTM SDK. If you have already used the Android N, this is great but not mandatory.


In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Finally, you register your implementation of the Camera.PreviewCallback interface in the onSurfaceChanged() method of the CameraPreview class."

A block of code is set as follows:

public static Camera getCameraInstance() {
  Camera c = null;
  try {
    c =;
  } catch (Exception e) { ...  }
  return c;

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "in the pop-up menu, go to Run As | 1 Android Application."


Warnings or important notes appear in a box like this.


Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at If you purchased this book elsewhere, you can visit and register to have the files e-mailed directly to you. You can also find the code files at


Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from


Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.


You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.