- {
- "app": {
- "launch": {
- "local_path": "TetrahedronTwister.html"
- }
- },
- "icons": { "16": "logo16.png",
- "128": "logo128.png" },
- "manifest_version": 2,
- "minimum_chrome_version": "23",
- "name": "Name of Your App or Game Here",
- "offline_enabled": true,
- "permissions": [ "storage" ],
- "version": "1.0.3"
- }
Declare what to open:
1 {
2 "app": {
3 "launch": {
4 "local_path": "NameOfYourWebUsually____index.html"
5 }
6 },
or if you want one of those "desktop" looking apps:
1 {
2 "app": {
3 "background": {
4 "scripts": "main.js"
5 }
6 },
main.js:
- /**
- * Listens for the app launching then creates the window
- *
- * @see http://developer.chrome.com/trunk/apps/app.runtime.html
- * @see http://developer.chrome.com/trunk/apps/app.window.html
- */
- chrome.app.runtime.onLaunched.addListener(function() {
- // Center window on screen.
- var screenWidth = screen.availWidth;
- var screenHeight = screen.availHeight;
- var width = 1280; //Size of your game's screen resolution's width, add space for ads
- var height = 720; //Size of your game's screen resolution's height, add space for ads
- chrome.app.window.create('NameOfYourWebUsually____index.html', {
- bounds: {
- width: width,
- height: height,
- left: Math.round((screenWidth-width)/2),
- top: Math.round((screenHeight-height)/2)
- }
- });
- });
Offline enabled doesn't need to be there if you are pointing to a page on your server, but if you are submitting the whole thing to the app store to be stored on their servers, then you do this so that the game will download to their computer and they won't have to connect online to play the game unless it does connection tests etc.
Permissions has a long list on their website, but I used "storage" for the ability to save in the future.
Finally version is your current version and should be updated each and every time.
No comments:
Post a Comment