You are previewing Pro Smartphone Cross-Platform Development: iPhone, BlackBerry, Windows Mobile, and Android Development and Distribution.
O'Reilly logo
Pro Smartphone Cross-Platform Development: iPhone, BlackBerry, Windows Mobile, and Android Development and Distribution

Book Description

Learn the theory behind cross-platform development, and put the theory into practice with code using the invaluable information presented in this book. With in-depth coverage of development and distribution techniques for iPhone, BlackBerry, Windows Mobile, and Android, you'll learn the native approach to working with each of these platforms. With detailed coverage of emerging frameworks like PhoneGap and Rhomobile, you'll learn the art of creating applications that will run across all devices. You'll also be introduced to the code-signing process and the distribution of applications through the major application stores, including RIM, Apple, and Microsoft.

Table of Contents

  1. Copyright
  2. Foreword
  3. About the Authors
  4. About the Technical Reviewer
  5. Acknowledgments
  6. Introduction
    1. Part 1: Platform Development and Distribution
    2. Part 2: Cross-Platform Native Frameworks
    3. Part 3: HTML Interfaces
  7. 1. The Smartphone is the New PC
    1. 1.1. Application Marketplace
      1. 1.1.1. Increase in Mobile Usage and Trend Toward Smartphones
    2. 1.2. What is a Smartphone?
      1. 1.2.1. Smartphone Landscape
      2. 1.2.2. Cross-Platform Frameworks
      3. 1.2.3. The Branded Experience of Mobile Applications
        1. 1.2.3.1. Cross-Platform Development
    3. 1.3. Web Techniques
    4. 1.4. Cross-Platform Frameworks
    5. 1.5. About this Book
  8. I. Platform Development and Distribution
    1. 2. iPhone
      1. 2.1. Introducing Xcode
      2. 2.2. iPhone Development Standard Practices
      3. 2.3. Building a Simple iPhone app
        1. 2.3.1. Create the Xcode Project
        2. 2.3.2. Create the Interface
          1. 2.3.2.1. Add UI Elements
          2. 2.3.2.2. Align the Text Greeting
          3. 2.3.2.3. Button and Text Field Layout
          4. 2.3.2.4. Writing the Controller Code
          5. 2.3.2.5. Connect the Code to the Views
          6. 2.3.2.6. Skinning an iPhone Web View
      4. 2.4. Installing the App on the Device
        1. 2.4.1.
          1. 2.4.1.1. Using the Development Provisioning Assistant
          2. 2.4.1.2. Manually Setting Up iPhone Provisioning
        2. 2.4.2. Finding Your Device ID
        3. 2.4.3. Create the Provisioning Profile
        4. 2.4.4. Install the Provisioning Profile
        5. 2.4.5. Install and Run on the Device
    2. 3. Android
      1. 3.1. Android Development
        1. 3.1.1. Setting Up The Development Environment With Eclipse
        2. 3.1.2. Building a Simple Android Application
        3. 3.1.3. Simple Application Using Android WebView
      2. 3.2. Building for an Android Device
      3. 3.3. Distribution on the Web
      4. 3.4. Android Market
    3. 4. BlackBerry
      1. 4.1. BlackBerry Platform
      2. 4.2. Set Up for Classic Java Development
      3. 4.3. Building a Simple BlackBerry Application
        1. 4.3.1. Create the Eclipse Project
        2. 4.3.2. Create the Interface
        3. 4.3.3. Code Explained
        4. 4.3.4. Build and Test the Application
        5. 4.3.5. Simple User Interface Application Using a Label, Text Field, and Button
        6. 4.3.6. Code Explained
        7. 4.3.7. Simple Application Using BlackBerry Browser Field
          1. 4.3.7.1. Building for a BlackBerry Device
          2. 4.3.7.2. Over the Air (OTA) Distribution
          3. 4.3.7.3. BlackBerry App World
    4. 5. Windows Mobile
      1. 5.1. Setting Up for Windows Mobile 6.5 Development
      2. 5.2. Building a Simple Windows Mobile App
        1. 5.2.1. Creating a Smart Device Project
        2. 5.2.2. Setting Up Base Functionality
          1. 5.2.2.1. Add a Button to the View
          2. 5.2.2.2. Customize the Button
          3. 5.2.2.3. Create a Click Event Handler
        3. 5.2.3. Deploying and Test your Application
        4. 5.2.4. Fleshing Out the Application
          1. 5.2.4.1. Embed a Web View in your Application
          2. 5.2.4.2. Create an HTML page
          3. 5.2.4.3. Add a WebBrowser Control
          4. 5.2.4.4. Load HTML in WebBrowser control
      3. 5.3. Packaging and Distributing Your App
        1. 5.3.1. Adding a CAB Project to the Solution
        2. 5.3.2. Customizing Your Product Name
        3. 5.3.3. Adding the Application to the CAB Project
        4. 5.3.4. Creating an Application Shortcut
        5. 5.3.5. Adding a Registry Entry
        6. 5.3.6. Building and Deploying the CAB File
        7. 5.3.7. Installing the CAB File
      4. 5.4. Distributing Your Application
  9. II. Cross-Platform Native Frameworks
    1. 6. Rhodes
      1. 6.1. Development Architecture
      2. 6.2. Runtime Architecture
        1. 6.2.1. Device Capabilities and Native UI Elements
      3. 6.3. Database (Rhom)
      4. 6.4. Threading
      5. 6.5. Differences Between Rhodes and Rails
      6. 6.6. Creating a Rhodes App
        1. 6.6.1. Installation and Setup
      7. 6.7. Building a Rhodes Application
      8. 6.8. Running the Application
        1. 6.8.1. Running on the iPhone
        2. 6.8.2. Running on Android
        3. 6.8.3. Running on BlackBerry
        4. 6.8.4. Running on Windows Mobile 6
      9. 6.9. Generating a Model
      10. 6.10. Debugging Tips
        1. 6.10.1. iPhone
        2. 6.10.2. BlackBerry
        3. 6.10.3. Android
      11. 6.11. Rhodes Device Capabilities
      12. 6.12. Contacts Example
      13. 6.13. Camera Example
      14. 6.14. Geolocation and Mapping Example
        1. 6.14.1. Creating the application
    2. 7. RhoSync
      1. 7.1. How the Sync Server Works
        1. 7.1.1. Data Storage: Why Triples?
      2. 7.2. RhoSync Source Adapters
      3. 7.3. Initialize
      4. 7.4. Authenticating with Web Services: Login and Logoff
      5. 7.5. Retrieving Data: Query and Sync
        1. 7.5.1. Query
        2. 7.5.2. Sync
      6. 7.6. Submitting Data: Create, Update, and Delete
        1. 7.6.1. Create
        2. 7.6.2. Update
        3. 7.6.3. Delete
      7. 7.7. User Authentication
      8. 7.8. Product Inventory Example
        1. 7.8.1. Creating Your Application on RhoHub
          1. 7.8.1.1. Implementing Your Source Adapter
          2. 7.8.1.2. Testing Your Source Adapter
        2. 7.8.2. Creating Your Application on a Local RhoSync Server
          1. 7.8.2.1. Generate the RhoSync Application
          2. 7.8.2.2. Setting up RhoSync Server
          3. 7.8.2.3. Testing Your Source Adapter
        3. 7.8.3. Debugging RhoSync Source Adapters
        4. 7.8.4. Testing Your Application
    3. 8. PhoneGap
      1. 8.1. Getting Started with PhoneGap
        1. 8.1.1. Sample Application
          1. 8.1.1.1. PhoneGap iPhone
        2. 8.1.2. Android
        3. 8.1.3. BlackBerry
        4. 8.1.4. PhoneGap Simulator
      2. 8.2. Writing Hello World in PhoneGap
      3. 8.3. Writing a PhoneGap Application
      4. 8.4. Contacts Example
        1. 8.4.1. Contact Example Code Explained
      5. 8.5. Camera Example
        1. 8.5.1. Camera Example Code Explained
    4. 9. Titanium Mobile
      1. 9.1. Getting Started
        1. 9.1.1. Writing Hello World
        2. 9.1.2. Building for Device
        3. 9.1.3. Titanium Mobile Device Capabilities
        4. 9.1.4. Camera Example
  10. III. HTML Interfaces
    1. 10. Mobile HTML and CSS
      1. 10.1. Platform Overview
        1. 10.1.1. iOS for iPhone, iPad, iPod Touch
        2. 10.1.2. Android
        3. 10.1.3. BlackBerry
        4. 10.1.4. Windows Mobile
      2. 10.2. Common Patterns
        1. 10.2.1. Screen-Based Approach
        2. 10.2.2. Navigation
          1. 10.2.2.1. Menus
          2. 10.2.2.2. Tab Bars
          3. 10.2.2.3. Toolbars
          4. 10.2.2.4. Navigation Bars
          5. 10.2.2.5. Button Bars and Context Menus
        3. 10.2.3. UI Widgets
        4. 10.2.4. Check Boxes
        5. 10.2.5. Selection Boxes
        6. 10.2.6. Text Boxes
        7. 10.2.7. Text Areas
        8. 10.2.8. Radio Buttons
        9. 10.2.9. Additional Components
        10. 10.2.10. WebKit Web Views
          1. 10.2.10.1. Creating Lists
          2. 10.2.10.2. Building a Navigation Bar
    2. 11. iWebKit
      1. 11.1. Working With the iWebKit Framework
        1. 11.1.1. A Few Words of Caution
        2. 11.1.2. Required Header
        3. 11.1.3. Body
        4. 11.1.4. Organizing Data with Lists
          1. 11.1.4.1. Classic Lists
          2. 11.1.4.2. iTunes Classic Style Lists
          3. 11.1.4.3. App Store-style Lists
          4. 11.1.4.4. iTunes style-lists
          5. 11.1.4.5. iPod-style lists
      2. 11.2. Navigation
      3. 11.3. Forms
        1. 11.3.1.
          1. 11.3.1.1. Labeling Field Sets
      4. 11.4. Landscape Mode
      5. 11.5. Phone Integration
      6. 11.6. Integrating iWebKit in Mobile Applications
        1. 11.6.1. Creating a Native iPhone Application with iWebKit in Objective C
        2. 11.6.2. Create an Application
        3. 11.6.3. Add iWebKit Framework to Application Layout Template
        4. 11.6.4. Setting up PhoneGap for iWebKit
    3. 12. Animated UI with jQTouch
      1. 12.1. Getting Started with jQTouch
        1. 12.1.1. Running Example Code
        2. 12.1.2. Creating a Simple jQTouch Application
      2. 12.2. Adding Screens
        1. 12.2.1. Loading Additional Screens with Ajax
        2. 12.2.2. Cancel, Back, and Browser History
        3. 12.2.3. Other Buttons
      3. 12.3. jQTouch Initialization Options
        1. 12.3.1. Basic Views
        2. 12.3.2. Customizing Your jQTouch Applications Animations
        3. 12.3.3. Navigation Bar (aka the Toolbar)
        4. 12.3.4. Customizing Your Views with Themes
        5. 12.3.5. Integration with Rhodes
        6. 12.3.6. Integration with PhoneGap
    4. 13. Sencha Touch
      1. 13.1. Getting Started
      2. 13.2. Adding HTML Text with a Panel
      3. 13.3. Adding Components
      4. 13.4. Creating Interactivity
    5. 14. BlackBerry HTML UI
      1. 14.1. BlackBerry Browser UI Controls
      2. 14.2. BlackBerry 4.2 Browser Control
        1. 14.2.1.
          1. 14.2.1.1. CSS
        2. 14.2.2. Fonts
        3. 14.2.3. Frames
        4. 14.2.4. JavaScript
        5. 14.2.5. Rhodes Tip for Dynamic Layout
      3. 14.3. BlackBerry 4.6 Browser Control
      4. 14.4. Display and User Interaction
      5. 14.5. Development Environment
    6. A. Cascading Style Sheets
      1. A.1. The Cascading in Style Sheets
      2. A.2. CSS Syntax
      3. A.3. Comments
      4. A.4. Identifying Elements with ID and Class
      5. A.5. Common Patterns
      6. A.6. Common CSS Attributes (Display: block verses inline)