Chrome apps: Easy!

Google is trying to get developers to build apps in Chrome. Chrome apps use all of the power of Chrome. They just don't have the bookmark bar, URL widget, and so on. And they can work stand-alone or can be network enabled. Since Chrome gives you the power of Web tools, cross-platform support, and their great debugger, why build UI's any other way? (If anyone has a reason, other than using Firefox instead, comment, please)

If you want to see it yourself, here's the simple recipe:

  • Set up Chrome so that apps will work.
  • Get an app
  • Tell Chrome about the app
  • Create a desktop shortcut

Set Up Chrome
Apps may depend on some APIs that Google considers experimental. To make sure that you don't get into trouble, start by enabling the experimental features. The source for these instructions is here

  • Go to chrome://flags.
  • Find "Experimental Extension APIs", and click its "Enable" link.
  • Restart Chrome.
Get an app
The easiest way to see what Chrome apps can do is to go to the source: Google. Their chrome app samples are up on Github, here. So clone them into someplace convenient.


git clone https://github.com/GoogleChrome/chrome-app-samples.git
Tell Chrome About The App
Chrome doesn't know about apps, per-se. But it does know about extensions. Open this URL in Chrome:
chrome://chrome/extensions/
Or if you like, navigate there: Customize -> Tools -> Extensions Customize is the icon at the top right of the window. Right now it looks like this:




Click "Developer Mode" on the right side of he extensions page, if not already checked:

Then click "Load Unpacked Extensions" on the left side of the page,  if not already checked. A directory browser window will open. Navigate to the directory that contains your extension and select.


If you choose the calculator example, you'll see something like this:


Now close the extensions page and open a new tab. You will see an icon for your app among your other apps and extensions.
Double click on the icon, and your app will load.

Change some of the source in that directory, and your the modified app will load.

Right click on the icon, and you'll see a dialog like this.



Click on create, and you'll get a shortcut on your Linux or Windows or Mac desktop.

Right now there's a bug in at least some versions of Linux. Here's the bug report.

The shortcut is missing a newline.

When I opened the shortcut in a text editor, here's what I saw:


And here's what I changed it to.

Click on the shortcut and your app will launch with Chrome invisible behind the scenes.






Comments

Popular Posts