Home Page Icon
Home Page
Table of Contents for
Cover
Close
Cover
by Marc Rochkind
Programming Chrome Apps
Dedication
Preface
What You Should Already Know
Why I Wrote This Book
Navigating This Book
Online Resources
Conventions Used in This Book
Using Code Examples
Safari® Books Online
How to Contact Us
Acknowledgments
1. Your First Chrome App
From Web Apps to Chrome Apps
Running a Chrome App
Using the Chrome Dev Editor
Differences Among Chrome Apps, Chrome Extensions, and Hosted Apps
Chrome App Restrictions
More on the Manifest
Permissions
Debugging Chrome Apps
Chrome Release Channels
Publishing a Chrome App
Self-Publishing
Publishing on the Chrome Web Store
Chapter Summary
2. Local Files, Sync Files, and External Files
Local Files
FileSystem and DirectoryEntry
Showing Transient Messages
Getting DirectoryEntrys
Getting FileEntrys and Creating FileWriters
Writing a File with the FileWriter API
Reading a File
Auto-Saving and Idle Events
Sync Files
How Syncing Works
Making the Note App Sync
Listening for the FileStatusChanged Event
Showing File Status
Finding Remote Copies on Google Drive
External Files
A Simple Editor
Choosing Files and Directories
Adding Backup by Using Retained File Entries
Chapter Summary
3. Local Storage, Sync Storage, and IndexedDB
Local and Sync Storage
Setting and Getting Local Storage
Implementing setParams and getParams
Adding Color Options to the Simple Editor App
Sync Storage
Removing Items and Clearing Storage
IndexedDB
IndexedDB Objects and Method Chaining
Opening a Database
Adding Objects in a Transaction
Retrieving Objects by Using an Index
Mailing List Example
Handling Forms
Adding and Updating Records
Deleting Records
Counting Records
Searching and Ranges
Deleting a Database
Importing Data
Exporting Data
Chapter Summary
4. Networking and Messaging
Socket API
How BSD Sockets Works
Chrome Socket API
Modules and Module Loading
Wrapping the Socket API as an Object in a Module
A Weather Report App
The XMLHttpRequest API
Identity API
Accessing the Facebook API
A Facebook Photos App
Accessing Google APIs
WebSockets
WebSockets API
Example WebSocket Server
Example WebSocket Client
Google Cloud Messaging
Example Application Server
Example Client
Summary of IDs, Numbers, and Keys
App-to-App Messaging
Notifications
Chapter Summary
5. Graphics and Imaging
Outputting Graphics
Calendar Example
Rendering the Calendar as Text
Rendering the Calendar as a Table
Rendering the Calendar as Positioned HTML
HTML5 Canvas
A Simple Canvas Example
Drawing the Calendar by Using a Canvas
Scalable Vector Graphics (SVG)
Another SVG Example
Differences Between Canvas and SVG
Drawing the Calendar by Using SVG
Creating PDFs
A Simple PDF Example
Outputting the Calendar as a PDF
Working with Images
Accessing Image Thumbnails and Metadata
Image Rendering Quality
The mediaGalleries API
The Principal mediaGalleries API Methods
A Media Browser
Chapter Summary
6. Miscellaneous APIs
Alarms
Context Menus
Location
Text-to-Speech
System Queries
Camera
Bluetooth, USB, and Serial APIs
Internationalization and Localization
Internationalizing and Localizing Strings
Internationalizing Numbers
Internationalizing Dates
Chapter Summary
A. Modal Dialogs
B. Registering Chrome Apps with Google
Registering a Chrome App and Getting a Client ID
Fixing the App ID
C. Using Google Cloud Messaging
Setting Up a GCM Project
Example App Server
Using Amazon Simple Notification Service
D. Using Cordova to Build Chrome Apps for Mobile Devices
Google’s Augmentation of Cordova
Development Tools and Debugging for Cordova
Creating and Testing Cordova Chrome Apps
Debugging Cordova Apps
Publishing Cordova Chrome Apps
Testing Using the Chrome Dev Editor
Index
About the Author
Colophon
Copyright
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Next
Next Chapter
Programming Chrome Apps
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset