The background permission is very important. Without it, how do you create the window?
chrome.app.window.create(...)
I have an app with the following manifest:
{
"manifest_version": 2,
"name": "MyApp",
"description": "MyApp",
"version": "0.7",
"minimum_chrome_version": "27",
"offline_enabled": true,
"options_page": "options.html",
"icons":
{
"16": "images/icon16.png",
"48": "images/icon48.png",
"128": "images/icon128.png"
},
"app":
{
"background":
{
"scripts":
[
"scripts/messaging.js",
"scripts/utils.js",
"scripts/database.js",
"scripts/fs.js",
"scripts/background.js"
]
}
},
"permissions":
[
"unlimitedStorage",
"fullscreen",
{
"fileSystem":
[
"write"
]
},
"background",
"<all_urls>"
],
"update_url": "http://192.168.1.101/chrome/crx/updates/MyApp2.xml"
}
This app shows as full screen. The database and file handling, as well as the creating of the user's window is all handled by background.js
which runs in the background. In a regular Chrome App when I've tried to add some of those functions (for example, chrome.app.window.create(...)
which is what creates the client window), the runtime has thrown an error saying those functions/objects don't exist in the front end. So, without background permission, how do I do those things?