How can I make a chrome packaged app which runs in fullscreen at startup?

Wouter Schut picture Wouter Schut · Mar 16, 2013 · Viewed 17.1k times · Source

Currently it seems that the fullscreen ability can only be activated from a user action (mouse/keyboard event). Is there a way to circumvent this?

Answer

Richard Cotrina picture Richard Cotrina · Feb 6, 2014

Now, you can just add the state:"fullscreen" property on your main .js:

chrome.app.runtime.onLaunched.addListener(
    function() {
        chrome.app.window.create('index.html',
            {
                state: "fullscreen",
            }
        );
    }
);

Make sure you don't add resizable: false or bounds properties, and you add a "fullscreen" permision on the manifest.json.

{
    ...
    "permissions": [
        ...
        "fullscreen"
    ]
}