Appcelerator Titanium Application Development by Example Beginner's Guide

Once you’ve got into Appcelerator Titanium you’ll never look back. This book is the perfect introduction to developing native cross-platform apps for iOS, Android, and Windows 8.

Appcelerator Titanium Application Development by Example Beginner's Guide

Beginner's Guide
Darren Cope

Once you’ve got into Appcelerator Titanium you’ll never look back. This book is the perfect introduction to developing native cross-platform apps for iOS, Android, and Windows 8.
$10.00
$49.99
RRP $29.99
RRP $49.99
eBook
Print + eBook
$12.99 p/month

Get Access

Get Unlimited Access to every Packt eBook and Video course

Enjoy full and instant access to over 3000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

+ Collection
Free Sample

Book Details

ISBN 139781849695008
Paperback334 pages

About This Book

  • Covers iOS, Android, and Windows8
  • Includes Alloy, the latest in Titanium design
  • Includes examples of Cloud Services, augmented reality, and tablet design

Who This Book Is For

If you are new to this technology or curious about the possibilities of Appcelerator Titanium then this book is for you. If you are a web developer who is looking for a way to craft cross-platform apps, then this book and the Titanium language is the choice for you.

Table of Contents

Chapter 1: How to Get Up and Running with Titanium
System requirements and restrictions
Installing Titanium
Time for action – installing Titanium Studio
Setting up Titanium Studio
Time for action – setting up Titanium Studio
Installing the Android SDK
Time for action – configuring the Android SDK
Installing the iOS SDK
Time for action – configuring the iOS SDK
Installation problems – did something go wrong?
Your first cross-platform app
Time for action – creating an app from a template
Time for action – running an app in the emulator
A review of the first app
tiapp.xml
Summary
Chapter 2: How to Make an Interface
What's in the toolkit?
A recap
Window
Tab group and tabs
Labels
Views
Time for action – adding a view to a window
Time for action – adding a button to a view
Time for action – making something happen when the button is pressed
Adding a settings screen – a TableView masterclass
Time for action – adding a new window
Time for action – adding a styled TableViewRow object
Platform-specific tools
Time for action – adding an Android menu
Time for action – running the Android menu changes on iOS
Time for action – add an iOS fix for the Android menu
Capturing debug messages
Time for action – adding an info button to the navigation bar
Summary
Chapter 3: How to Design Titanium Apps
JSON
Extending your app over multiple files
Time for action – creating an activity indicator
Require
Time for action – adding an Appcelerator marketplace module
MVC
Time for action – creating a better designed app using MVC
Behind the scenes – a look at the code
Alloy
Time for action – creating an Alloy app
Summary
Chapter 4: Gluing Your App Together with Events, Variables, and Callbacks
Sharing data
Global variables
Time for action – sharing information between windows
Events

Time for action – creating a progress bar game
Summary
Chapter 5: It's All About Data
External data
Time for action – creating an HTTP request
RSS reader
Time for action – fetching RSS
Time for action – parsing and displaying the RSS
Storing data on the device
Storing data in files
Storing settings in Ti.App.Properties
Time for action – comparing the speed of database, file, and application properties
YQL
Time for action – creating a foreign exchange list
Summary
Chapter 6: Cloud-enabling Your Apps
Before the cloud
Which cloud services can you use with Titanium?
Appcelerator Cloud Services
Time for action – creating ACS custom objects
Uploading pictures
Time for action – uploading a photo to the cloud
Fetching ACS stored content
Time for action – creating a panel to show commentary entries
Parse
Time for action – storing custom objects using Parse
StackMob
Other cloud offerings
Choosing your cloud service
Summary
Chapter 7: Putting the Phone Gadgets to Good Use
The camera
Time for action – using the camera
Time for action – selecting a photo from the photo library
The accelerometer
Time for action – showing the accelerometer on a slider
Time for action – smoothing the accelerometer response
The compass
Time for action – displaying the compass heading
Augmented reality
Time for action – creating a simple augmented reality app
Maps
Time for action – adding a map
Time for action – adding annotations to a map
Directions
Time for action – adding directions to a map
Geolocation
Accuracy and battery life
Time for action – getting the current location
Computing the distance from a coordinate
Time for action – getting the distance from a coordinate
Showing the user's current location on a map
Time for action – showing the user's location on the map
Summary
Chapter 8: Creating Beautiful Interfaces
How to position and size items on a window?
Time for action - making DIPs the default unit for your app
Orientation
Time for action – restricting the orientation of your app (iPhone)
Time for action – restricting the orientation of your app [Android]
Time for action – forcing an orientation change (all platforms)
Creating layouts for phones and tablets
Time for action – creating a multiplatform interface
Time for action – creating a phone layout for your app
Summary
Chapter 9: Spread the Word with Social Media
Facebook
Time for action – registering your app with Facebook
Time for action – sending a screenshot to Facebook
Sending tweets
Time for action – registering your app with Twitter
Time for action – sending a tweet
Sharing and social media on Android
Time for action – sharing an update using intents
Summary
Chapter 10: Sending Notifications
How push notifications work
Setting up notifications - the prerequisites
Time for action – getting a push certificate
Push notifications using Appcelerator Cloud
Time for action – registering for push notifications with Appcelerator Cloud
Push notifications using Urban Airship
Time for action – registering for push notifications with Urban Airship
Time for action – registering a device for push notifications
Summary
Chapter 11: Testing and Deploying
Registering your app with Apple
Time for action – registering your app with Apple
Time for action – installing a development certificate
Running the app on devices
Time for action – running the app on an iOS device
Time for action – configuring your Android device
Debug your app
Publishing your app
Time for action – deploying the app to the Apple App Store
Time for action – deploying the app to Google Play
Summary
Chapter 12: Analytics
Comparing the providers
Flurry
Time for action – setting up Flurry
Time for action – registering a page view
Time for action – registering a custom event
Google Analytics
Time for action – setting up Google Analytics
Time for action – registering a page view
Time for action – registering a custom event
Analytics using Appcelerator
Time for action – setting up Appcelerator Analytics
Time for action – registering a custom event
Other suppliers
Summary
Chapter 13: Making Money from Your App
Displaying adverts in your app
Time for action – configuring Google AdMob
Time for action – incorporating AdMob into your app
In-app purchases
Time for action – adding in-app purchases for iOS
Time for action – adding in-app purchases for Android
Summary

What You Will Learn

  • How to design applications that work on all supported platforms
  • How to create layouts that work on all platforms and on both handheld and tablet devices
  • How to design applications using Alloy
  • The integration of social media
  • Use the phone gadgets such as the accelerometer, compass, and camera
  • How to integrate cloud services such as ACS, Parse, and Stackmob
  • How to test your code and deploy to the app store/marketplace

In Detail

Appcelerator Titanium is the leading method for creating native cross-platform apps. This book guides you from the initial stages with the language right through to the submission of your app to the marketplace/app store. Specially crafted examples cover the most common requirements of an app programmer. This book will be your companion as you progress with the language.

"Appcelerator Titanium Application Development by Example Beginner's Guide" will guide you through the process of designing cross-platform apps using Titanium. It covers all areas of the language from installation through development to submission to the store.

This book will take a hands-on approach in teaching you how to write cross-platform apps using Titanium, as well as exploring the new features of Titanium 3. Each chapter will show you how to overcome specific challenges using Titanium. You will learn how to design your apps using MVC principles and Alloy, use the cloud to your advantage, develop apps that work on tablets and phones, use the phone gadgets like the accelerometer, integrate social media, record usage using analytics, and monetise your app. All tasks from installation to deployment to the store are covered and backed by examples. The book will be your companion from your first steps with Titanium to successful live deployment.

Authors

Table of Contents

Chapter 1: How to Get Up and Running with Titanium
System requirements and restrictions
Installing Titanium
Time for action – installing Titanium Studio
Setting up Titanium Studio
Time for action – setting up Titanium Studio
Installing the Android SDK
Time for action – configuring the Android SDK
Installing the iOS SDK
Time for action – configuring the iOS SDK
Installation problems – did something go wrong?
Your first cross-platform app
Time for action – creating an app from a template
Time for action – running an app in the emulator
A review of the first app
tiapp.xml
Summary
Chapter 2: How to Make an Interface
What's in the toolkit?
A recap
Window
Tab group and tabs
Labels
Views
Time for action – adding a view to a window
Time for action – adding a button to a view
Time for action – making something happen when the button is pressed
Adding a settings screen – a TableView masterclass
Time for action – adding a new window
Time for action – adding a styled TableViewRow object
Platform-specific tools
Time for action – adding an Android menu
Time for action – running the Android menu changes on iOS
Time for action – add an iOS fix for the Android menu
Capturing debug messages
Time for action – adding an info button to the navigation bar
Summary
Chapter 3: How to Design Titanium Apps
JSON
Extending your app over multiple files
Time for action – creating an activity indicator
Require
Time for action – adding an Appcelerator marketplace module
MVC
Time for action – creating a better designed app using MVC
Behind the scenes – a look at the code
Alloy
Time for action – creating an Alloy app
Summary
Chapter 4: Gluing Your App Together with Events, Variables, and Callbacks
Sharing data
Global variables
Time for action – sharing information between windows
Events

Time for action – creating a progress bar game
Summary
Chapter 5: It's All About Data
External data
Time for action – creating an HTTP request
RSS reader
Time for action – fetching RSS
Time for action – parsing and displaying the RSS
Storing data on the device
Storing data in files
Storing settings in Ti.App.Properties
Time for action – comparing the speed of database, file, and application properties
YQL
Time for action – creating a foreign exchange list
Summary
Chapter 6: Cloud-enabling Your Apps
Before the cloud
Which cloud services can you use with Titanium?
Appcelerator Cloud Services
Time for action – creating ACS custom objects
Uploading pictures
Time for action – uploading a photo to the cloud
Fetching ACS stored content
Time for action – creating a panel to show commentary entries
Parse
Time for action – storing custom objects using Parse
StackMob
Other cloud offerings
Choosing your cloud service
Summary
Chapter 7: Putting the Phone Gadgets to Good Use
The camera
Time for action – using the camera
Time for action – selecting a photo from the photo library
The accelerometer
Time for action – showing the accelerometer on a slider
Time for action – smoothing the accelerometer response
The compass
Time for action – displaying the compass heading
Augmented reality
Time for action – creating a simple augmented reality app
Maps
Time for action – adding a map
Time for action – adding annotations to a map
Directions
Time for action – adding directions to a map
Geolocation
Accuracy and battery life
Time for action – getting the current location
Computing the distance from a coordinate
Time for action – getting the distance from a coordinate
Showing the user's current location on a map
Time for action – showing the user's location on the map
Summary
Chapter 8: Creating Beautiful Interfaces
How to position and size items on a window?
Time for action - making DIPs the default unit for your app
Orientation
Time for action – restricting the orientation of your app (iPhone)
Time for action – restricting the orientation of your app [Android]
Time for action – forcing an orientation change (all platforms)
Creating layouts for phones and tablets
Time for action – creating a multiplatform interface
Time for action – creating a phone layout for your app
Summary
Chapter 9: Spread the Word with Social Media
Facebook
Time for action – registering your app with Facebook
Time for action – sending a screenshot to Facebook
Sending tweets
Time for action – registering your app with Twitter
Time for action – sending a tweet
Sharing and social media on Android
Time for action – sharing an update using intents
Summary
Chapter 10: Sending Notifications
How push notifications work
Setting up notifications - the prerequisites
Time for action – getting a push certificate
Push notifications using Appcelerator Cloud
Time for action – registering for push notifications with Appcelerator Cloud
Push notifications using Urban Airship
Time for action – registering for push notifications with Urban Airship
Time for action – registering a device for push notifications
Summary
Chapter 11: Testing and Deploying
Registering your app with Apple
Time for action – registering your app with Apple
Time for action – installing a development certificate
Running the app on devices
Time for action – running the app on an iOS device
Time for action – configuring your Android device
Debug your app
Publishing your app
Time for action – deploying the app to the Apple App Store
Time for action – deploying the app to Google Play
Summary
Chapter 12: Analytics
Comparing the providers
Flurry
Time for action – setting up Flurry
Time for action – registering a page view
Time for action – registering a custom event
Google Analytics
Time for action – setting up Google Analytics
Time for action – registering a page view
Time for action – registering a custom event
Analytics using Appcelerator
Time for action – setting up Appcelerator Analytics
Time for action – registering a custom event
Other suppliers
Summary
Chapter 13: Making Money from Your App
Displaying adverts in your app
Time for action – configuring Google AdMob
Time for action – incorporating AdMob into your app
In-app purchases
Time for action – adding in-app purchases for iOS
Time for action – adding in-app purchases for Android
Summary

Book Details

ISBN 139781849695008
Paperback334 pages
Read More