O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building Android Apps with HTML, CSS, and JavaScript

Book Description

If you know HTML, CSS, and JavaScript, you already have the tools you need to develop Android apps. With this book, you'll learn how to use these web technologies to design and build apps for any Android device, using the framework of your choice. No knowledge of Java is required.

Table of Contents

  1. Dedication
  2. Special Upgrade Offer
  3. A Note Regarding Supplemental Files
  4. Preface
    1. Who Should Read This Book
    2. What You Need to Use This Book
    3. Conventions Used in This Book
    4. Using Code Examples
    5. Safari® Books Online
    6. How to Contact Us
    7. Acknowledgments
  5. 1. Getting Started
    1. Web Apps Versus Native Apps
      1. What Is a Web App?
      2. What Is a Native App?
      3. Pros and Cons
      4. Which Approach Is Right for You?
    2. Web Programming Crash Course
      1. Introduction to HTML
      2. Introduction to CSS
        1. Applying a stylesheet
      3. Introduction to JavaScript
  6. 2. Basic Styling
    1. Don’t Have a Website?
    2. First Steps
      1. Prepare a Separate Android Stylesheet
      2. Control the Page Scaling
    3. Adding the Android CSS
    4. Adding the Android Look and Feel
    5. Adding Basic Behavior with jQuery
    6. What You’ve Learned
  7. 3. Advanced Styling
    1. Adding a Touch of Ajax
    2. Traffic Cop
      1. Setting Up Some Content to Work With
      2. Routing Requests with JavaScript
    3. Simple Bells and Whistles
      1. Progress Indicator
      2. Setting the Page Title
      3. Handling Long Titles
      4. Automatic Scroll-to-Top
      5. Hijacking Local Links Only
      6. Roll Your Own Back Button
    4. Adding an Icon to the Home Screen
    5. What You’ve Learned
  8. 4. Animation
    1. With a Little Help from Our Friend
    2. Sliding Home
    3. Adding the Dates Panel
    4. Adding the Date Panel
    5. Adding the New Entry Panel
    6. Adding the Settings Panel
    7. Putting It All Together
    8. Customizing jQTouch
    9. What You’ve Learned
  9. 5. Client-Side Data Storage
    1. Web Storage
      1. Saving User Settings to Local Storage
      2. Saving the Selected Date to Session Storage
    2. Web SQL Database
      1. Creating a Database
      2. Inserting Rows
        1. Error handling
      3. Selecting Rows and Handling Result Sets
      4. Deleting Rows
    3. What You’ve Learned
    4. Web Database Error Code Reference
  10. 6. Going Offline
    1. The Basics of the Offline Application Cache
    2. Online Whitelist and Fallback Options
    3. Creating a Dynamic Manifest File
    4. Debugging
      1. The JavaScript Console
    5. What You’ve Learned
  11. 7. Going Native
    1. Introduction to PhoneGap
    2. Download the Android SDK
    3. Download PhoneGap
    4. Setting Up the Environment
    5. Create an Android Virtual Device
    6. Build KiloGap
    7. Installing KiloGap in the Emulator
      1. Using the Screen’s Full Height
      2. Customizing the App Icon
    8. Installing KiloGap on Your Phone
    9. Controlling the Phone with JavaScript
      1. Beep, Vibrate, and Alert
      2. Geolocation
      3. Accelerometer
    10. What You’ve Learned
  12. 8. Submitting Your App to the Android Market
    1. Preparing a Release Version of Your App
      1. Removing Debug Code
      2. Versioning Your App
      3. Signing Your App
    2. Uploading Your App to the Android Market
    3. Distributing Your App Directly
    4. Further Reading
  13. A. Detecting Browsers with WURFL
    1. Installation
    2. Configuration
    3. Testing wurfl-php
  14. Index
  15. About the Author
  16. Colophon
  17. Special Upgrade Offer
  18. Copyright