Appcelerator Titanium Smartphone App Development Cookbook - Second Edition

Over 100 recipes to help you develop cross-platform, native applications in JavaScript

Appcelerator Titanium Smartphone App Development Cookbook - Second Edition

Jason Kneen

1 customer reviews
Over 100 recipes to help you develop cross-platform, native applications in JavaScript
Mapt Subscription
FREE
$29.99/m after trial
eBook
$25.20
RRP $35.99
Save 29%
Print + eBook
$44.99
RRP $44.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$25.20
$44.99
$29.99p/m after trial
RRP $35.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Code Files
Preview in Mapt

Book Details

ISBN 139781849697705
Paperback368 pages

Book Description

The mobile web has paved the way but many users want to have “native” applications installed. Using Appcelerator as a platform it’s now possible to write iOS, Android, and Windows phone applications in JavaScript! It allows developers to develop fully native UI applications using Appcelerator studio tools without any knowledge of Objective-C, Swift or Java.

This book will take you through the process of building cross-platform, native UI applications for the mobile from scratch. You will learn how to develop apps, how to use GPS, cameras and photos and how to build socially connected apps. You will also learn how to package them for submission to the App Store and Google Play.

This cookbook takes a pragmatic approach to creating applications in JavaScript from putting together basic UIs, to handling events and implementation of third party services such as Twitter, Facebook and Push notifications. The book shows you how to integrate datasources and server APIs, and how to use local databases. The topics covered will guide you to use Appcelerator Studio tools for all the mobile features such as Geolocation, Accelerometer, animation and more. You’ll also learn about Alloy, the Appcelerator MVC framework for rapid app development, and how to transfer data between applications using URLSchemes, enabling other developers to access and launch specific parts of your app.

Finally, you will learn how to register developer accounts and publish your very own applications on the App Store and Google Play.

Table of Contents

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 and switches
Passing custom variables between windows
Creating buttons and capturing click events
Informing your users with dialogs and alerts
Creating charts using Raphael JS
Creating an actionbar in Android
Chapter 2: Working with Local and Remote Data Sources
Introduction
Reading data from remote XML via 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 with Yahoo YQL and JSON
Creating a SQLite database
Saving data locally using a SQLite database
Retrieving data from a SQLite database
Creating a "Pull to Refresh" mechanism in iOS
Chapter 3: Integrating Maps and GPS
Introduction
Adding a MapView to your application
Getting your current position using GeoLocation
Converting addresses to latitude and longitude locations
Adding annotations to your MapView
Customizing annotations and adding events to your MapView
Drawing routes on your MapView
Monitoring your heading using the device compass
Chapter 4: Enhancing Your Apps with Audio, Video, and Cameras
Introduction
Choosing your capture device using an OptionDialog modal
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 to Social Media and E-mail
Introduction
Composing and sending e-mails
Adding attachments to an e-mail
Setting up a custom Facebook application
Integrating Facebook into your Titanium app
Posting to your Facebook wall
Posting to Twitter in iOS
Posting to Facebook in iOS
Sharing on Android using Intents
Chapter 6: Getting to Grips with Properties and Events
Introduction
When should you use app properties?
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 Implementing Drag and Drop
Introduction
Animating a view using the Animate method
Animating a view using 2D Matrix and 3D Matrix transformations
Dragging an ImageView using touch events
Scaling an ImageView using the slider control
Saving our funny face 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 an iPhone
Updating data using background fetch
Displaying local notifications on an 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 Parse.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 the differences between the iOS and Android APIs
Ensuring that 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
Building your application for iOS using studio
Joining the Google Android developer program
Creating your application's distribution key
Building and submitting your app to the Google Play Store
Chapter 13: Implementing and Using URL Schemes
Introduction
Detecting whether another iOS app is installed
Launching another iOS app
Passing parameters to other apps via a URL
Launching Apple Maps and Google Maps with route directions
Opening URLs in Chrome for iOS
Setting up your own apps to use URL schemes
Receiving URL commands in your own app
Transferring binary data between apps using a URL scheme
Chapter 14: Introduction to Alloy MVC
Introduction
Installing Alloy and creating an Alloy project
Building views and windows
Creating Buttons and Labels using Events
Changing the look of your app with styles
Working with Navigation and TabGroups
Adding an Alloy widget to your application
Creating your own Alloy widget
Integrating data using models and collections

What You Will Learn

  • Transfer data between applications with URL schemes, and make your application accessible to other mobile applications and services
  • Connect with remote services using JSON
  • Work with Google Maps and Apple Maps, GPS and annotate routes
  • Create animations and special effects
  • Integrate notifications and connect with social media services such as Facebook and Twitter
  • Build applications with Alloy MVC – a rapid application development framework
  • Design native APIs and use local databases

Authors

Table of Contents

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 and switches
Passing custom variables between windows
Creating buttons and capturing click events
Informing your users with dialogs and alerts
Creating charts using Raphael JS
Creating an actionbar in Android
Chapter 2: Working with Local and Remote Data Sources
Introduction
Reading data from remote XML via 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 with Yahoo YQL and JSON
Creating a SQLite database
Saving data locally using a SQLite database
Retrieving data from a SQLite database
Creating a "Pull to Refresh" mechanism in iOS
Chapter 3: Integrating Maps and GPS
Introduction
Adding a MapView to your application
Getting your current position using GeoLocation
Converting addresses to latitude and longitude locations
Adding annotations to your MapView
Customizing annotations and adding events to your MapView
Drawing routes on your MapView
Monitoring your heading using the device compass
Chapter 4: Enhancing Your Apps with Audio, Video, and Cameras
Introduction
Choosing your capture device using an OptionDialog modal
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 to Social Media and E-mail
Introduction
Composing and sending e-mails
Adding attachments to an e-mail
Setting up a custom Facebook application
Integrating Facebook into your Titanium app
Posting to your Facebook wall
Posting to Twitter in iOS
Posting to Facebook in iOS
Sharing on Android using Intents
Chapter 6: Getting to Grips with Properties and Events
Introduction
When should you use app properties?
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 Implementing Drag and Drop
Introduction
Animating a view using the Animate method
Animating a view using 2D Matrix and 3D Matrix transformations
Dragging an ImageView using touch events
Scaling an ImageView using the slider control
Saving our funny face 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 an iPhone
Updating data using background fetch
Displaying local notifications on an 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 Parse.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 the differences between the iOS and Android APIs
Ensuring that 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
Building your application for iOS using studio
Joining the Google Android developer program
Creating your application's distribution key
Building and submitting your app to the Google Play Store
Chapter 13: Implementing and Using URL Schemes
Introduction
Detecting whether another iOS app is installed
Launching another iOS app
Passing parameters to other apps via a URL
Launching Apple Maps and Google Maps with route directions
Opening URLs in Chrome for iOS
Setting up your own apps to use URL schemes
Receiving URL commands in your own app
Transferring binary data between apps using a URL scheme
Chapter 14: Introduction to Alloy MVC
Introduction
Installing Alloy and creating an Alloy project
Building views and windows
Creating Buttons and Labels using Events
Changing the look of your app with styles
Working with Navigation and TabGroups
Adding an Alloy widget to your application
Creating your own Alloy widget
Integrating data using models and collections

Book Details

ISBN 139781849697705
Paperback368 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Appcelerator Titanium: Patterns and Best Practices Book Cover
Appcelerator Titanium: Patterns and Best Practices
$ 14.99
$ 10.50
Appcelerator Titanium Business Application Development Cookbook Book Cover
Appcelerator Titanium Business Application Development Cookbook
$ 29.99
$ 21.00
Appcelerator Titanium Smartphone App Development Cookbook Book Cover
Appcelerator Titanium Smartphone App Development Cookbook
$ 26.99
$ 18.90
Appcelerator Titanium Application Development by Example Beginner's Guide Book Cover
Appcelerator Titanium Application Development by Example Beginner's Guide
$ 29.99
$ 21.00
Creating Mobile Apps with Appcelerator Titanium Book Cover
Creating Mobile Apps with Appcelerator Titanium
$ 26.99
$ 18.90
Augmented Reality using Appcelerator Titanium Starter Book Cover
Augmented Reality using Appcelerator Titanium Starter
$ 12.99
$ 9.10