Skip to content

mikemaccana/chrome-bluetooth

Repository files navigation

Try it now in CWS

Hello World

This is a starter application. It contains a basic manifest file with no additional permissions. The manifest denotes a background script, main.js, detailed below:

chrome.app.runtime.onLaunched.addListener(function() {
  // Center window on screen.
  var screenWidth = screen.availWidth;
  var screenHeight = screen.availHeight;
  var width = 500;
  var height = 300;

  chrome.app.window.create('index.html', {
    id: "helloWorldID",
    bounds: {
      width: width,
      height: height,
      left: Math.round((screenWidth-width)/2),
      top: Math.round((screenHeight-height)/2)
    }
  });
});

This simply waits for the launch event for the application (chrome.app.runtime.onLaunched.addListener) and, at that point, creates a window using a basic HTML page, index.html, as the source.

Resources

Screenshot

screenshot

About

Chrome Bluetooth test

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published