gpt4 book ai didi

javascript - Google Chrome Packaged App - 在系统启动时运行

转载 作者:数据小太阳 更新时间:2023-10-29 04:06:19 24 4
gpt4 key购买 nike

我需要获取一个 Google 打包应用程序以在系统启动时运行。因此,当操作系统启动时,它会自动加载我的应用程序。

有什么方法可以在 Google Chrome 中执行此操作??

提前致谢。

最佳答案

如果您真的希望您的应用“在操作系统启动时”启动,那么答案是:您不能。

否则,如果您的应用在用户登录时启动没有问题,请将“background” 权限添加到您的 list 文件。

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.

“后台”权限仅适用于托管应用,legacy packaged apps和扩展, Chrome apps .

如果您想在 Chrome 应用程序中使用“后台”权限,那么唯一的方法就是将扩展程序列入白名单。这可以使用 --whitelisted-extension-id 标志来完成:

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

您只能通过命令行将一个扩展程序列入白名单,因此这应该仅用于测试。如果您想使用后台权限发布您的应用程序,那么您就不走运了。 Chromium 团队故意禁用了该权限,请参阅 https://code.google.com/p/chromium/issues/detail?id=163770 .

关于javascript - Google Chrome Packaged App - 在系统启动时运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17883043/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com