Appengine Channel API Sample
Item logo image for Appengine Channel API Sample

Appengine Channel API Sample

Developer Tools32 users
Item media 1 screenshot

Overview

AppEngine Channel API example This is an example of how to use the AppEngine's Channel API in a Chrome Packaged App. Since the…

AppEngine Channel API example This is an example of how to use the AppEngine's Channel API in a Chrome Packaged App. Since the Channel API is not directly compatible with the CSP restrictions in a packaged app, this sample uses a WebView and a "proxy" object that communicates with the Webview using async postMessage. This code is an adaptation of the Tic Tac Toe game used by the AppEngine team to demonstrate the Channel API. The main modifications from the original game are: index.html is not rendered as a template in the server, it is embedded in the app. All responses from the server are JSON messages; the server doesn't use the appengine's user library, since that would require another authentication step. Instead, the server attributes a random UUID to the first user and another to the second. This user ID is returned to the client that uses it in the following calls. It is not secure, but simple enough for this sample. In a real application, this method would allow an eaversdropper to capture the GET request and replay with different commands; all the interations with the channel API are abstracted in the ChannelAPI object defined by channel_in_a_webview.js. This object communicates with the webview page (channel_in_a_webview.html), served to the webview from the appengine server. To run: go to the appengine folder and type dev_appserver.py . install the Chrome Packaged App in the app folder run the Chrome packaged app twice and copy the game ID from one screen to the other play Appengine Channel API Webview See the source code at https://github.com/GoogleChrome/chrome-app-samples/tree/master/appengine_channelapi/app This version was built from git commit d0e4bdf https://github.com/GoogleChrome/chrome-app-samples/tree/d0e4bdf/appengine_channelapi/app

0 out of 5No ratings

Google doesn't verify reviews. Learn more about results and reviews.

Details

  • Version
    2
  • Updated
    October 1, 2013
  • Offered by
    Chrome App Samples
  • Size
    390KiB
  • Languages
    English (United States)
  • Non-trader
    This developer has not identified itself as a trader. For consumers in the European Union, please note that consumer rights do not apply to contracts between you and this developer.

Privacy

The developer has not provided any information about the collection or usage of your data.

Support

For help with questions, suggestions, or problems, visit the developer's support site

Google apps