Creating a google chrome app

Monkey Archive Forums/Monkey Tutorials/Creating a google chrome app

Aman(Posted 2011) [#1]
1- Create file: "manifest.json" in your flash or html5 build folder.
2- Paste the following code in the file you just created:
{
  // Required
  "name": "Name of your game",
  "version": "Your game version",

  // Recommended
  "description": "This will show up in the extension control panel",
  "icons": {
    "128": "icon_128.png", //the game icon
    "16": "icon_16.png"    //the html page favicon
  },

  // Required
  "app": {
    "launch": {
      "local_path": "MonkeyGame.html"
    }
  },
  
  // Add any of these that you need
  "update_url": "http://path/to/updateInfo.xml",
  "content_security_policy": "default-src 'self' ",
  "incognito": "spanning",
  "offline_enabled": true,
  "permissions": ["cookies"]   //required for saving and loading state
}

For more info about how to modify this file visit:
http://code.google.com/chrome/extensions/manifest.html

3- In Google Chrome address bar, Goto "chrome://extensions/"
4- Click on the sign button next to "Developer mode" to expand it.
5- three buttons will show up, click on "Load Unpacked Extension"
6- choose your html5 or flash build file

Your app icon will show up in the app page. Modify it to your satisfaction. Any changes you make in your build folder will be updated automatically.



If you want to send the app to someone, pack your extension by clicking on the "Pack Extension" button in the extension page. this will create a .crx file that can be dragged into google chrome and installed. the other file ".pem" contains your app key. If you lose it, the next time you make an update, it will be treated as a new app and will be installed next to the old one.



If you want to publish the app to chrome web store. Goto this link:
https://chrome.google.com/webstore/developer/dashboard


DruggedBunny(Posted 2011) [#2]
Cool, will have to try this, many thanks!


Snader(Posted 2013) [#3]
Anyone tried this? It looks really nice.

Packaged Apps

http://developer.chrome.com/apps/about_apps.html

Not working yet when using LoadString. Anyone has a workaround for this?


Sensei(Posted 2014) [#4]
Just tested this and it works like a charm! Guess Spacewhale will be on the Chrome App store cards! I like the simplicity of it all.


Raz(Posted 2014) [#5]
I had no idea this was here! I'm impressed how simple it is! :)


Aman(Posted 2014) [#6]
I forgot I wrote this. I can't believe this still works with the latest version of chrome. I remember Firefox was also this simple.