chrome.app.runtime

Description: Use the chrome.app.runtime module to manage the app lifecycle. The app runtime manages app installation, controls the event page, and can shut down the app at anytime.
Availability: Google Chrome 23
Permissions: None
Learn more: Manage App Lifecycle
Chrome Office Hours: Introduction to Chrome Apps

chrome.app.runtime reference

Events

onLaunched

chrome.app.runtime.onLaunched.addListener(function(object launchData) {...});

Fired when an app is launched from the launcher.

Listener Parameters

launchData ( optional object )
id ( optional string )
The id of the file handler that the app is being invoked with.
items ( optional array of object )

onRestarted

chrome.app.runtime.onRestarted.addListener(function() {...});

Fired at Chrome startup to apps that were running when Chrome last shut down.

Sample Apps that use chrome.app.runtime

  • Google Analytics Sample
  • Appsquare
  • Browser
  • Calculator – A simple calculator.
  • Camera Capture Example
  • World Clock – A world clock application.
  • Context Menu Example
  • Hello Dart!
  • Diff Tool – View diff and merge two files.
  • Filesystem Access Example
  • Frameless Window – Chrome platform app.
  • Google Drive Uploader
  • Syncable storage sample
  • Hello World
  • Identity API
  • Google Wallet Test App – App to test CWA.
  • Step1 – 3rd Party Auth step1
  • Hello world
  • Apps IO 2012 – Chrome Apps IO 2012 presentation.
  • Servo – Show off serial functionality.
  • IOIO Demo – Blinks the on-board LED
  • mDNS Browser – Browses mDNS services on the local network
  • Media Gallery Sample – Used to test Media Gallery API
  • Messaging App1
  • Messaging App2
  • MiniCodeEdit – A very small code editor.
  • Multicast Chat Demo App – Sending/Receiving multicast diagrams.
  • Optional permissions – Shows how to use the optional permissions API
  • Parrot AR.Drone 2.0 Controller
  • Push Guestbook – Displays the last post to an anonymous guestbook using push messaging
  • Push Messaging Roundtrip Sample – Tests push messaging end to end.
  • Push Messaging Sample Client App – A sample to demonstrate how to use Chrome Push Messaging.
  • Restarted demo
  • Notify Test App – Tests the notification API
  • Sandboxed Frame
  • Sandboxed Content
  • Serial Control Signals – Test serial control signal API.
  • Chrome ADK control
  • Serial Test
  • Servo – Show off serial functionality.
  • Singleton Window
  • Storage test
  • SyncFS editor – SyncFS editor (syncFileSystem sample)
  • SystemInfo Sample – Show disk capacity via SystemInfo API
  • TCP server and client
  • Telnet Client
  • Simple Text Editor (Packaged app) – Syntax highlighting text editor
  • Echo – Echo..... Echo.
  • Label printer
  • USB Spinner
  • Weather – A simple weather application.
  • Hello 3D World
  • HTTP Webserver - File – HTTP Webserver - File
  • Webview test
  • Window State Sample
  • Windowing API
  • Zephyr HXM Demo – Demo of Zephyr HXM Heart Rate Monitor interaction