Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Adding readme to all samples.
- Loading branch information
Showing
27 changed files
with
245 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Clock | ||
|
||
A widget-like application that provides a world clock, an alarm, a timer and a stopwatch. | ||
|
||
## APIs | ||
|
||
* [Sync Storage API](http://developer.chrome.com/trunk/apps/storage.html) | ||
* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html) | ||
* [Window](http://developer.chrome.com/trunk/apps/app.window.html) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
# Context menus | ||
|
||
Sample that shows how to use the [context menu API](http://developer.chrome.com/trunk/apps/contextMenus.html) in an app to achieve per-window menus. | ||
|
||
Context menus are normally global to the entire app, and thus all windows would have the same menu. This sample uses a `focus` event handler in each window to detect when a window is brought to the foreground. When it is, the contents of the context menu are updated with that window's commands. The `chrome.contextMenus.onClicked` event handler also only handles events that occur in that window. | ||
|
||
## APIs | ||
|
||
* [Context menu API](http://developer.chrome.com/trunk/apps/contextMenus.html) | ||
* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html) | ||
* [Window](http://developer.chrome.com/trunk/apps/app.window.html) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Diff | ||
|
||
A non-trivial application to diff two files choosen by the user. This app shows how you can open for reading and for writing files in the user's computer, as long as the file was explicitly selected by the user. It uses the Filesystem API, which is an extension of the HTML5 Filesystem API. | ||
|
||
## APIs | ||
|
||
* [Local Storage API](http://developer.chrome.com/trunk/apps/storage.html) to save history of selected files | ||
* [Filesystem API](http://developer.chrome.com/trunk/apps/app_storage.html) to allow the user to pick arbitrary files from the disk and save them back. | ||
* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html) | ||
* [Window](http://developer.chrome.com/trunk/apps/app.window.html) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
# Explicit WebIntents | ||
|
||
This sample shows how two apps ("ping" and "pong") can communicate via explicit web intents without direct user involvement. | ||
|
||
Install both "ping" and "pong". Launch either app, and press the "Dispatch intent" button. The other app will be launched (if it's not running already), and the intent data will be delivered to its background page via the `onLaunched` event (and then in turn to its window). The other app will reply, and the reply will be displayed in the window of the app that sent the intent. | ||
|
||
## APIs | ||
|
||
* [WebIntents](http://developer.chrome.com/apps/app_intents.html) | ||
* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html) | ||
* [Window](http://developer.chrome.com/trunk/apps/app.window.html) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Frameless window | ||
|
||
A sample application to showcase how you can use frame:'none' windows to allow total customization of the window's real state. At beginning, the window is open with no titlebar. As long as you check one of the titlebars, it is added to the appropriate position. Notice that the added titlebars are the only parts of the window that allows dragging. This is achieved through a special CSS property applied to what is NOT to be draggable (in this case, the whole content of the window, except the titlebars): `-webkit-widget-region: region(control rectangle);` | ||
|
||
## APIs | ||
|
||
* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html) | ||
* [Window](http://developer.chrome.com/trunk/apps/app.window.html) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Identity | ||
|
||
A sample application that uses the Identity API to request identification information of the logged in user and present this info on the screen. If the user has a profile picture, a XMLHttpRequest2 request is also sent to grab the image and show it in the app. | ||
|
||
This app uses the getAuthToken flow of the Identity API, so it only works with Google accounts. If you want to identify the user in a non-Google OAuth2 flow, you should use the launchWebAuthFlow method instead. | ||
|
||
## APIs | ||
|
||
* [Identity](http://developer.chrome.com/trunk/apps/app.identity.html) | ||
* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html) | ||
* [Window](http://developer.chrome.com/trunk/apps/app.window.html) | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# IOIO Bluetooth device | ||
|
||
Very simple IOIO client. Tested with [this hardware](http://www.adafruit.com/blog/2012/06/15/new-product-ioio-mint-portable-android-development-kit/) | ||
|
||
The constants and information about the protocol was taken from https://github.com/ytai/ioio/wiki/ | ||
|
||
## Caveats: | ||
* The bluetooth API is only available on Chrom(e|ium)OS | ||
* Resource clean-up isn't happening properly yet: you will likely have to disable/enable bluetooth between runs of the program or the connection will fail | ||
|
||
## APIs | ||
|
||
* [Bluetooth](http://developer.chrome.com/apps/experimental.bluetooth.html) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# mDNS browser | ||
|
||
This is a non-trivial sample which uses the UDP multicast support in Chrome Packaged Apps to browse mDNS servers. mDNS protocol is usually used for home appliance devices, like the Apple's Bonjour. Read more about the mDNS protocol at this [Wikipedia's article](http://en.wikipedia.org/wiki/Multicast_DNS) | ||
|
||
|
||
## APIs | ||
|
||
* [UDP Network](http://developer.chrome.com/trunk/apps/app_network.html#udp) | ||
* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html) | ||
* [Window](http://developer.chrome.com/trunk/apps/app.window.html) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Mini code editor | ||
|
||
A non-trivial sample with basic features of a code editor, like syntax detection and syntax highlight. If also uses the extended FileSystem API that allows a user to select files from the disk so the app can read and write to that file. | ||
|
||
## APIs | ||
|
||
* [chrome.fileSystem](http://developer.chrome.com/trunk/apps/fileSystem.html) | ||
* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html) | ||
* [Window](http://developer.chrome.com/trunk/apps/app.window.html) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Serial Control Signals | ||
|
||
This sample demonstrates how you can send and receive control signals (DTR, RTS, DCD and CTS) to/from a serial port. | ||
|
||
## APIs | ||
|
||
* [Serial API](http://developer.chrome.com/trunk/apps/app.hardware.html#serial) | ||
* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html) | ||
* [Window](http://developer.chrome.com/trunk/apps/app.window.html) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
adkjs | ||
===== | ||
# ADK kit in Javascript | ||
|
||
This demo is composed of two parts and require a ADK 1.0 hardware (Arduino board+shield shipped at Google I/O 2011 to demonstrate Android hardware integration). | ||
This demo is composed of two parts and require a ADK 1.0 hardware (Arduino board+shield shipped at Google I/O 2011) to demonstrate Android hardware integration. | ||
|
||
The demo simulates the same visual interface of the Android application, but in HTML5. There are UI widgets to control the servo motors, led lights and relays, and it gets sensors and buttons events. | ||
|
||
In the firmware directory, there is the Arduino app you must upload. We could not use exactly the same arduino code from the original Android ADK because it uses a USB port where the board is the USB host, and that woudl conflict with the computer USB port that is always the host. Anyway, just upload this arduino code to the board and you are set. | ||
In the firmware directory, there is the Arduino app you must upload. We could not use exactly the same arduino code from the original Android ADK because it uses a USB port where the board is the USB host, and that woudl conflict with the computer USB port that is always the host. Upload the arduino firmware code to the board and you are set. | ||
|
||
In the app directory, you will find the packaged Chrome app. | ||
In the app directory, you will find the Chrome Packaged App. | ||
|
||
## APIs | ||
|
||
* [Serial API](http://developer.chrome.com/trunk/apps/app.hardware.html#serial) | ||
* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html) | ||
* [Window](http://developer.chrome.com/trunk/apps/app.window.html) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,12 @@ | ||
# Arduino servo control | ||
|
||
Note: on Mac OS X Lion, it's necessary to update USB Serial drivers: | ||
http://geekscape.posterous.com/mac-os-x-17-lion-upgrading-ftdi-usb-serial-dr | ||
|
||
This app displays a slider that, when dragged, causes a servo attached to an Arduino to move. The Arduino sketch is included and should be uploaded to the Arduino. | ||
|
||
## APIs | ||
|
||
* [Serial API](http://developer.chrome.com/trunk/apps/app.hardware.html#serial) | ||
* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html) | ||
* [Window](http://developer.chrome.com/trunk/apps/app.window.html) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# Hello World | ||
# Singleton window | ||
|
||
Sample that shows how to use the [windowing API](http://developer.chrome.com/trunk/apps/appWindow.html) in an app to have a "singleton" window app. | ||
Sample that shows how to use the [window API](http://developer.chrome.com/trunk/apps/appWindow.html) in an app to have a "singleton" window app. | ||
|
||
The app keeps track of its window in the background page. If none exists, or if it's closed, it creates a new one. Otherwise it re-focuses the existing one via `chrome.app.window.focus()`. | ||
|
||
## APIs | ||
|
||
* [Windowing](http://developer.chrome.com/trunk/apps/app.window.html) | ||
* [Window](http://developer.chrome.com/trunk/apps/app.window.html) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Storage simple test | ||
|
||
A very basic application that demonstrates the Filesystem API. It allows you to request a filesystem, write a sample file to it and query how many bytes are available. | ||
|
||
## APIs | ||
|
||
* [Filesystem](http://developer.chrome.com/trunk/apps/app_storage.html) | ||
* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html) | ||
* [Window](http://developer.chrome.com/trunk/apps/app.window.html) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Code editor | ||
|
||
A non-trivial sample with basic features of a code editor, like language detection and syntax highlight. If also uses the extended FileSystem API that allows a user to select files from the disk so the app can read and write to that file. This sample is very similar to the [mini-code-editor](https://github.com/GoogleChrome/chrome-app-samples/tree/master/mini-code-edit) | ||
|
||
## APIs | ||
|
||
* [chrome.fileSystem](http://developer.chrome.com/trunk/apps/fileSystem.html) | ||
* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html) | ||
* [Window](http://developer.chrome.com/trunk/apps/app.window.html) | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# A simple UDP echo client | ||
|
||
------------------------------ | ||
|
||
[127.0.0.1:3007 ] [Connect] | ||
|
||
**o | ||
.. | ||
. | ||
|
||
|
||
|
||
------------------------------ | ||
|
||
Connects to a UDP echo server at the given address. | ||
|
||
Each little dot represents a echo request. | ||
When the request receives a reply, it shoots away and blows up. | ||
When a request doesn't receive a reply, it grows into a big ball and blows up. | ||
|
||
The dots gravitate towards each other for extra spiffiness. | ||
|
||
### Server side | ||
|
||
In the `server` directory, you will find a Node echo server that intentionally drops some packets to simulate a real network. Run this server before, so you can connect the client (Chrome Packaged App) to it. | ||
|
||
## APIs | ||
|
||
* [UDP Network](http://developer.chrome.com/trunk/apps/app_network.html#udp) | ||
* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html) | ||
* [Window](http://developer.chrome.com/trunk/apps/app.window.html) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
NOTE | ||
---- | ||
This demo interfaces with a Griffin PowerMate device, reading its position and displaying it via a Chrome logo. It does not currently work on Mac OS X, since on that platform the OS claims the PowerMate is an HID device, and does not allow raw USB access to it. | ||
# Griffin PowerMate knob | ||
|
||
This demo interfaces with a [Griffin PowerMate](http://en.wikipedia.org/wiki/Griffin_PowerMate) device, reading its position and displaying it via a Chrome logo. It does not currently work on Mac OS X, since on that platform the OS claims the PowerMate is an HID device, and does not allow raw USB access to it. | ||
|
||
## APIs | ||
|
||
* [USB raw access](http://developer.chrome.com/trunk/apps/app_hardware.html#usb) | ||
* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html) | ||
* [Window](http://developer.chrome.com/trunk/apps/app.window.html) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# WebIntent handler | ||
|
||
This sample is an image editor that, when launched as a normal app, works as a simple image editor. However, it also registers itself as an image editor WebIntent handler. So, if you go to any other site or app that triggers an edit image intent, this app will be presented as an option. | ||
|
||
## APIs | ||
|
||
* [WebIntents](http://developer.chrome.com/apps/app_intents.html) | ||
* [Runtime](http://developer.chrome.com/trunk/apps/app.runtime.html) | ||
* [Window](http://developer.chrome.com/trunk/apps/app.window.html) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# Copycat Window | ||
|
||
Sample that shows how to use the [windowing API](http://developer.chrome.com/trunk/apps/app.window.html) to create a window with a custom frame and manipulate its properties. | ||
Sample that shows how to use the [window API](http://developer.chrome.com/trunk/apps/app.window.html) to create a window with a custom frame and manipulate its properties. | ||
|
||
The app creates two windows, an "original" window and a "copycat" window. The copycat window mimics the position and minimize state of the original window, but it displays itself in an inverted fashion. | ||
|
||
## APIs | ||
|
||
* [Windowing](http://developer.chrome.com/trunk/apps/app.window.html) | ||
* [Window](http://developer.chrome.com/trunk/apps/app.window.html) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.