Book Image

Augmented Reality using Appcelerator Titanium Starter

By : Trevor Ward
Book Image

Augmented Reality using Appcelerator Titanium Starter

By: Trevor Ward

Overview of this book

Titanium Mobile has quickly become the platform of choice for many mobile developers and is growing and changing at a rapid rate. From the implementation of CommonJS, Cloud Services, MVC design patterns and more, the last year in Titanium development has been a roller coaster of change for the better. Augmented Reality is a hot area for mobile applications and this book along with the augmentedTi open source application will give a great start to all augmented applications. This book will show you how to build an Augmented Reality application, which is clean, efficient and usable. It shows how to hide the processing from the user and build a display which updates and rotates smoothly.Mobile devices have got more powerful, but they still have limitations. Augmented Reality applications test these devices to breaking point and without the correct coding techniques make the applications unresponsive and cumbersome.This book gives a solution, which will enable you to build an effective application, and is accompanied by a complete working application and source code. It's essential for anybody who is creating a multiple points of interest augmented reality application. It shows how to build this type of application efficiently and takes into consideration the devices limitations and processing capabilities.
Table of Contents (9 chapters)
Augmented Reality using Appcelerator Titanium Starter
About the author
About the reviewers


augmentedTi is a demonstration application, showing an implementation of Augmented Reality, using the Titanium framework.

Step 1 – What do I need?

To set up and run the augmentedTi application, you will need to have the latest version of Titanium Studio installed, a device to test on, and for iPhone an Apple developer account. The application uses Google Places to obtain its data and you will have to obtain your own API key for this feature, before getting the application from bitbucket.

Step 2 – Downloading Titanium Studio

If you haven't already got the latest version of Titanium, go to and click on the download link. If you already have an Appcelerator account, log in; if not, create one (it's free). Select the version you need from the downloads area (see the following screenshot):


Titanium Studio is based on the Eclipse IDE, so if you are familiar with this then there should be no issues. If you are not, have a read of some of the documentation. Working with studio is outside the scope of this book. The application has been developed using Version 2.1.0 of the Titanium SDK.

Step 3 – Apple developer account

If you wish to run the application on an iPhone, you will need to configure the provisioning profile. One thing to remember is to change the application ID to meet your requirements. You can find out more about the Apple developer account at

Step 4 – Google Places API

The application uses Google Places to provide the data. You will have to use your Google account to generate the Google Places API key. Details on the API can be found at Creating the API key is done at

Log in to the console using your Google account details and go to the Services section. About two-thirds of the way down the page you will see the Places API option. Switch it on. If this is your first visit to the console, an API key will be created. The API key can be found in the API Access section. The API key needs to be inserted into the augmentedTi application file, services/googleFeed.js, at the following location:


Step 5 – Get augmentedTi

The augmentedTi application is available from bitbucket at and can be imported directly into Titanium Studio.

For those who haven't done this before, open the studio and select File from the main menu and click on Import. This will bring up a selection box, as shown in the following screenshot:

Select Git/Git repository as New Project and click on Next. This will bring up a second box, shown as follows:

Paste the bitbucket URI, [email protected]:softlywired/augmentedti.git, into the URI box. For Destination, either accept the default destination or select your own and click on Finish.

This will import the project into the workspace and enable you to start to look around. When it is imported, open up the tiapp.xml file and change the application ID for your Apple provisioning profile and also insert the Google Places API key.


You may find that you cannot run the project in the studio. This is due to a bug in Eclipse and can be remedied by deleting the project (do not delete the contents), removing the .project file from the source directory, and then importing it again as an existing Titanium project.

And that's it!

By this point, you should have augmentedTi installed and running on your device.


See the README file for the latest supported platforms and devices.