简体   繁体   中英

Google Chrome Packaged App - run at system startup

I need to get a Google Packaged App to run at system startup. So, when the OS boots, it automatically loads my app.

Any way to do this in Google Chrome??

Thanks in advance.

If you literally want your app to start up "when the OS boots", then the answer is: You can't.

Otherwise, if it's OK if your app starts when the user logs in, add the "background" permission to your manifest file.

Permission "background"

Makes Chrome start up early and and shut down late, so that apps and extensions can have a longer life.

When any installed hosted app, packaged app, or extension has "background" permission, Chrome runs (invisibly) as soon as the user logs into their computer—before the user launches Chrome. The "background" permission also makes Chrome continue running (even after its last window is closed) until the user explicitly quits Chrome.

The "background" permission is only available for hosted apps, legacy packaged apps and extensions, not for Chrome apps .

If you want to use the "background" permission in a Chrome App, then the only way to do this is to get the extension whitelisted. This can be done using the --whitelisted-extension-id flag:

chromium --whitelisted-extension-id=[YOUREXTENSIONID - 32 chars a-p]

You can only have one extension whitelisted via the command-line, so this should only be used for testing. If you want to publish your app with the background permission, then you're out of luck. The permission was intentionally disabled by the Chromium team, see https://code.google.com/p/chromium/issues/detail?id=163770 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM