Appcelerator Titanium Smartphone App Development Cookbook
Formats:
save 15%!
save 37%!
Free Shipping!
| Also available on: |
|
- Leverage your JavaScript skills to write mobile applications using Titanium Studio tools with the native advantage!
- Extend the Titanium platform with your own native modules
- A practical guide for packaging and submitting your apps to both the iTunes store and Android Marketplace
- Part of Packt's Cookbook series: Each recipe is a carefully organized sequence of instructions to complete the task as efficiently as possible
Book Details
Language : EnglishPaperback : 308 pages [ 235mm x 191mm ]
Release Date : December 2011
ISBN : 1849513961
ISBN 13 : 9781849513968
Author(s) : Boydlee Pollentine
Topics and Technologies : All Books, Android, iOS, Cookbooks
Table of Contents
PrefaceChapter 1: Building Apps using Native UI Components
Chapter 2: Working with Local and Remote Data Sources
Chapter 3: Integrating Google Maps and GPS
Chapter 4: Enhancing your Apps with Audio, Video, and the Camera
Chapter 5: Connecting your Apps with Social Media and E-mail
Chapter 6: Getting to Grips with Events and Properties
Chapter 7: Creating Animations, Transformations, and Understanding Drag-and-drop
Chapter 8: Interacting with Native Phone Applications and APIs
Chapter 9: Integrating your Apps with External Services
Chapter 10: Extending your Apps With Custom Modules
Chapter 11: Platform Differences, Device Information, and Quirks
Chapter 12: Preparing your App for Distribution and Getting it Published
Index
- Chapter 1: Building Apps using Native UI Components
- Introduction
- Building with Windows and Views
- Adding a TabGroup to your app
- Creating and formatting Labels
- Creating TextFields for user input
- Working with keyboards and keyboard toolbars
- Enhancing your App with Sliders & Switches
- Passing custom variables between windows
- Creating buttons and capturing click events
- Informing your users with dialogs and alerts
- Creating charts using Raphael JS
- Chapter 2: Working with Local and Remote Data Sources
- Introduction
- Reading data from remote XML through HTTPClient
- Displaying data using a TableView
- Enhancing your TableViews with custom rows
- Filtering the TableView using a SearchBar component
- Speeding up your remote data access using JSON and Yahoo! YQL
- Creating an SQLite database
- Saving data locally using an SQLite database
- Retrieving data from an SQLite database
- Creating a "pull and release" refresh mechanism
- Chapter 3: Integrating Google Maps and GPS
- Introduction
- Adding a MapView to your application
- Getting your current position using GeoLocation
- Converting addresses to latitude and longitude positions
- Adding annotations to your MapView
- Customizing annotations and capturing MapView events
- Drawing routes on your MapView
- Monitoring your heading using the device compass
- Chapter 4: Enhancing your Apps with Audio, Video, and the Camera
- Introduction
- Choosing your capture device using an OptionDialog
- Capturing photos from the camera
- Choosing existing photos from the photo library
- Displaying photos using ScrollableView
- Saving your captured photo to the device filesystem
- Capturing and playing audio via the audio recorder
- Capturing video via the video recorder
- Playing video files from the filesystem
- Safely deleting saved files from the filesystem
- Chapter 5: Connecting your Apps with Social Media and E-mail
- Introduction
- Composing and sending an e-mail
- Adding attachments to an e-mail
- Setting up a custom Facebook application
- Integrating Facebook into your Titanium App
- Posting on your Facebook wall
- Connecting to Twitter using OAuth
- Uploading an image using PHP and HttpRequest
- Sending a tweet through Birdhouse and OAuth
- Chapter 6: Getting to Grips with Events and Properties
- Introduction
- Reading and writing app properties
- Firing and capturing events
- Passing event data between your app and a Webview using custom events
- Chapter 7: Creating Animations, Transformations, and Understanding Drag-and-drop
- Introduction
- Animating a View using the "animate" method
- Animating a View using 2D matrix and 3D matrix transforms
- Dragging an ImageView using touch events
- Scaling an ImageView using a Slider control
- Saving our "Funny Face" image using the toImage() method
- Chapter 8: Interacting with Native Phone Applications and APIs
- Introduction
- Creating an Android Options menu
- Accessing the contacts address book
- Storing and retrieving data via the clipboard
- Creating a background service on the iPhone
- Displaying local notifications on the iPhone
- Displaying Android notifications using intents
- Storing your Android app on the device's SD card
- Chapter 9: Integrating your Apps with External Services
- Introduction
- Connecting to APIs that use basic authentication
- Fetching data from the Google Places API
- Connecting to FourSquare using OAuth
- Posting a check-in to FourSquare
- Searching and retrieving data via Yahoo! YQL
- Integrating push notifications with UrbanAirship.com
- Testing push notifications using PHP and HTTP POST
- Chapter 10: Extending your Apps With Custom Modules
- Introduction
- Integrating an existing module—the PayPal Mobile Payment Library
- Preparing your iOS module development environment
- Developing a new iPhone module using XCode
- Creating a public API method
- Packaging and testing your module using the test harness
- Packaging your module for distribution and sale
- Chapter 11: Platform Differences, Device Information, and Quirks
- Introduction
- Gathering information about your device
- Obtaining the device's screen dimensions
- Understanding device orientation modes
- Coding around differences between the iOS and Android APIs
- Ensuring your device can make phone calls
- Chapter 12: Preparing your App for Distribution and Getting it Published
- Introduction
- Joining the iOS Developer Program
- Installing iOS Developer Certificates and Provisioning Profiles
- Build your app for iOS using Titanium Studio
- Joining the Google Android Developer Program
- Creating your application's distribution key
- Building and submitting your app to the Android Marketplace
Boydlee Pollentine
Code Downloads
Download the code and support files for this book.
Submit Errata
Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.
Errata
- 7 submitted: last submission 03 Jan 2013Errata type: Code | Page number: 25
//reference the current window var win1 = Titanium.UI.currentWindow;
should be:
//reference the current window
var win2 = Titanium.UI.currentWindow;
Errata type: Others | Page number: 25
win1.add(view);
should be: win2.add(view);
Errata type: Code | Page number: 171
Insert:
function setChoseImage(e){};
Before:
imageViewFace.addEventListener(‘click’, function(e){
Errata type: Others | Page number: 175
Complete source code for this recipe can be found in the /Chapter 7/Recipe 2 folder.
should be
Complete source code for this recipe can be found in the /Chapter 7/Recipe 3 folder.
Errata type: Code | Page number: 17
font: {fontSize: 14, fontFamily: 'Helvetica', fontWeight:'bold'},},
should be:
font: {fontSize: 14, fontFamily: 'Helvetica', fontWeight:'bold'},
Errata type: Others | Page number: 43 and 54
The URL http://www.cuisine.com.au/feed/all-recipes
should be replaced with
www.taste.com.au/feeds/latest+recipes.xml to get similar results.
You could also try these sample feeds:
http://news.yahoo.com/rss/internet
http://pipes.yahoo.com/pipes/pipe.run?_id=6d700ffd24a9b9d776bab0cd0205d1b5&_render=rss
http://boydlee.com/feed.html
Errata type: Code | Page number: 82
The line win1.add(search); should be added at the end of the first code snippet, right after searchview.add(btnSearch);.
Sample chapters
You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.
- Design compelling interfaces using native components
- Consume remote data sources using both XML and JSON
- Utilize SQLite to leverage local data capture and offline storage
- Integrate with Google Maps and learn how to draw routes, use the compass, create annotations and more
- Create brilliant layout effects using animations and transitions
- Integrate with social media such as Twitter and Facebook
- Integrate with third party services including FourSquare and Urban Airship Push notifications
- Take full advantage of your device’s camera and audio capture capabilities
Appcelerator Titanium Mobile allows developers to realize their potential to develop full native iPhone and Android applications by using free Titanium Studio tools without the need to know Objective-C or Java. This practical hands-on cookbook shows you exactly how to leverage the Titanium API to its full advantage and become confident in developing mobile applications in no time at all.
Appcelerator Titanium Smartphone App Development Cookbook offers a set of practical and clear recipes with a step-by-step approach for building native applications for both the iPhone and Android platforms using your existing knowledge of JavaScript.
This cookbook takes a pragmatic approach to using your JavaScript knowledge to create applications for the iPhone and Android platforms, from putting together basic UIs to handling events and implementation of third party services such Twitter, Facebook and Push notifications. This book shows you how to utilize both remote and local datasources using XML, JSON and the SQLite database system. The topics covered will guide you to use popular Titanium Studio tools effectively and help you leverage all the advanced mobile features such as Geolocation, Accelerometer, animation and more. Finally, you’ll learn how to register developer accounts and how to publish your very own apps to the Android and Apple marketplaces.
Written in a cookbook style, this book offers solutions using a recipe-based approach. Each recipe contains step-by-step instructions followed by an analysis of what was done in each task and other useful information. The cookbook approach means you can dive into whatever recipes you want in no particular order.
This book is an essential for any developer who possesses some JavaScript or web development knowledge and wishes to take a leap into building native applications for both the iPhone and Android. No knowledge of Objective C and Java is required.

