You are previewing Rapid Android Development.
O'Reilly logo
Rapid Android Development

Book Description

Create mobile apps for Android phones and tablets faster and more easily than you ever imagined. Use "Processing," the free, award-winning, graphics-savvy language and development environment, to work with the touchscreens, hardware sensors, cameras, network transceivers, and other devices and software in the latest Android phones and tablets.

Table of Contents

  1. Rapid Android Development
  2. For the Best Reading Experience...
  3. Table of Contents
  4. Early praise for Rapid Android Development
  5. Foreword
  6. Acknowledgments
  7. Preface
    1. Introducing Processing for the Android
    2. Who This Book Is For
    3. Prerequisites
    4. What’s in This Book
    5. How to Read This Book
    6. What You Need to Use This Book
    7. Tested Android Devices for this Book
    8. Online Resources
  8. Part 1: Getting Started with the Touch Screen and Android Sensors
  9. Chapter 1: Getting Started
    1. Install the Required Software
    2. Write Your First Android Sketch
    3. Run a Sketch in the Android Emulator
    4. Run a Sketch on an Android Device
    5. Wrapping Up
  10. Chapter 2: Working with the Touch Screen Display
    1. Introducing the Android Touch Screen
    2. Using Colors
    3. Use Mouse Speed to Control Hues
    4. Introducing the Ketai Library
    5. Install the Ketai Library
    6. Working with the KetaiGesture Class
    7. Detect Multitouch Gestures
    8. Wrapping Up
  11. Chapter 3: Using Motion and Position Sensors
    1. Introducing the Device Hardware and Software Layers
    2. Introducing Common Android Sensors
    3. Working with the KetaiSensor Class
    4. List the Built-In Sensors on an Android Device
    5. Display Values from the Accelerometer
    6. Display Values from Multiple Sensors
    7. Build a Motion-Based Color Mixer and Palette
    8. Save a Color
    9. Build a Palette of Colors
    10. Erase a Palette with a Shake
    11. Wrapping Up
  12. Part 2: Working with Camera and Location Devices
  13. Chapter 4: Using Geolocation and Compass
    1. Introducing the Location Manager
    2. Working with the KetaiLocation Class
    3. Determine Your Location
    4. Setting Sketch Permissions
    5. Working with the Location Class
    6. Determine the Distance Between Two Locations
    7. Determine the Speed and Bearing of a Moving Device
    8. Find Your Way to a Destination
    9. Find a Significant Other (Device)
    10. Wrapping Up
  14. Chapter 5: Using Android Cameras
    1. Introducing the Android Camera and APIs
    2. Working with the KetaiCamera Class
    3. Display a Back-Facing Camera Full-Screen Preview
    4. Toggle Between the Front- and Back-Facing Cameras
    5. Snap and Save Pictures
    6. Superimpose and Combine Images
    7. Detect and Trace the Motion of Colored Objects
    8. Detect Faces
    9. Wrapping Up
  15. Part 3: Using Peer-to-Peer Networking
  16. Chapter 6: Networking Devices with Wi-Fi
    1. Working with Wi-Fi on Android Devices
    2. Working with Networking Classes
    3. Using the Open Sound Control Networking Format
    4. Network an Android with a Desktop PC
    5. Share Real-Time Data
    6. Network a Pair of Androids for a Multiplayer Game
    7. Wrapping Up
  17. Chapter 7: Peer-to-Peer Networking Using Bluetooth and Wi-Fi Direct
    1. Introducing Short-Range Networking and UI Classes
    2. Working with the KetaiBluetooth Class
    3. Introducing Bluetooth
    4. Working with the Android Activity Life Cycle
    5. Connect Two Android Devices via Bluetooth
    6. Create a Survey App Using Bluetooth
    7. Working with Wi-Fi Direct
    8. Use Wi-Fi Direct to Control Remote Cursors
    9. Wrapping Up
  18. Chapter 8: Using Near Field Communication (NFC)
    1. Introducing NFC
    2. Working with the KetaiNFC Class and NDEF Messages
    3. Share a Camera Preview Using NFC and Bluetooth
    4. Read a URL from an NFC Tag
    5. Write a URL to an NFC Tag
    6. Wrapping Up
  19. Part 4: Working with Data
  20. Chapter 9: Working with Data
    1. Introducing Databases
    2. Working with the Table Class and the File System
    3. Working with Android Storage
    4. Read a Tab-Separated Grocery List
    5. Read Comma-Separated Web Color Data
    6. Save User Data in a TSV File
    7. Write Data to External Storage
    8. Visualize Real-Time Earthquake Data
    9. Add Vibes to the Earthquake App
    10. Wrapping Up
  21. Chapter 10: Using SQLite Databases
    1. Working with SQLite Databases
    2. Working with the KetaiSQLite Class
    3. Implement a Data Table in SQLite
    4. Record Sensor Data into a SQLite Database
    5. Refine SQLite Results Using WHERE Clauses
    6. Wrapping Up
  22. Part 5: Creating 3D Graphics and Cross-Platform Apps
  23. Chapter 11: Introducing 3D Graphics with OpenGL
    1. Introducing 3D Graphics and OpenGL
    2. Work with 3D Primitives and Lights
    3. Apply an Image Texture
    4. Use the Camera Preview as 3D Texture
    5. Work with Spot and Point Lights
    6. Use Custom Fonts and Large Amounts of Text
    7. Wrapping Up
  24. Chapter 12: Working with Shapes and 3D Objects
    1. Working with the PShape Class
    2. Working with SVG Graphics and Maps
    3. Map the United States
    4. Display an Architectural Model Loaded from an Object File
    5. Create a Möbius Shape and Control It Using the Gyroscope
    6. Use GPU Memory to Improve Frame Rate
    7. Control a Virtual Camera with Your Gaze
    8. Wrapping Up
  25. Chapter 13: Sharing and Publishing Applications
    1. Share Your Code
    2. Brand Your App
    3. Move Your App to Eclipse
    4. Publish Your App to Google Play
    5. Package Your App to Run in HTML5-Ready Browsers
    6. Wrapping Up
  26. Appendix 1: Appendix
    1. Android Version History
    2. The Ketai Library Classes
    3. Writing to a Text File on a Web Server
    4. Troubleshooting
  27. Bibliography
    1. You May Be Interested In…