如何创建以信息亭模式有效地充当启动页面的Chrome应用? [英] How do I create a Chrome App effectively acting as a launch page in kiosk mode?

查看:141
本文介绍了如何创建以信息亭模式有效地充当启动页面的Chrome应用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我第一次尝试创建Chrome应用.我们学校想为Chromebook创建信息亭应用,以便在我们的网络服务器上启动一个包含快捷链接的网页.这主要是为了让像幼儿园的年轻人这样的年轻用户可以绕过登录屏幕,从而使登录屏幕仍适用于年龄较大的学生.我昨天花了一些时间,并通过Google Apps管理控制台进行了部署,但是该应用程序未显示在我们的设备上.我确定这是我的代码有问题.

当我在Windows计算机上将应用程序作为扩展程序安装在Chrome上时,出现以下错误消息:

There were warnings when trying to install this extension:
'kiosk_enabled' is only allowed for packaged apps, but this is a hosted app.
'browser' is only allowed for packaged apps, but this is a hosted app.

这是我manifest.json文件中的代码.

{
    "name": "Homepage",
    "version": "0.1",
    "manifest_version": 2,
    "description": "School homepage",
    "icons": {
            "128": "hn128x128.png",
            "96": "hn96x96.png"
        },
    "app": {
            "urls": ["http://mydomain/homepage/"],
            "launch": {
                    "web_url": "http://mydomain/homepage/"
            }
        },
  "permissions": [
    "browser"
    ],
  "kiosk_enabled": true
}

我希望允许访客模式起作用,但是似乎没有一种方法可以为访客配置主页.

解决方案

您似乎在这里遇到的问题是,关于托管应用程序和kiosk_enabled的使用,文档不够清晰.实际上,manifest.json验证的发生不一致.

Chrome托管应用是一种利用以下功能的应用:

"app": {
        "urls": ["http://mydomain/homepage/"],
        "launch": {
                "web_url": "http://mydomain/homepage/"
        }
    },

与Chrome打包的应用程序不同,其中app标签通常包含javascript的background部分.创建打包应用程序的最简单方法是使用webview,如 Sarah Elan 在她的回答中所建议的. /p> 您在Windows下的Chrome浏览器中的错误消息所报告的

Chrome托管应用程序的kiosk_enabled 无效. 只有打包的应用程序才可用于信息亭.

不幸的是,目前的情况似乎是:

  • 没有(可以找到的)明确的文档证明托管应用程序不能为kiosk_enabled.
  • 当您上传到CWS时,没有对上述事实进行验证,因此无效的应用程序可以在CWS中,甚至可以在Google Apps管理界面中分配为信息亭应用程序-以后会失败.对于这些项目,我会与Google进行公开的问题报告,如果有解决方案,则会解决此问题.

您似乎可以通过另一种方式来实现所需的目标:使用

I was hoping that allowing guest mode would work, but there doesn't seem to be a way to configure a homepage for guests.

The issue you appear to have here is that the documentation is not quite as clear as it should be regarding hosted apps and the use of kiosk_enabled, complicated further by the fact manifest.json validation currently happens inconsistently.

A Chrome Hosted App is one that makes use of:

"app": {
        "urls": ["http://mydomain/homepage/"],
        "launch": {
                "web_url": "http://mydomain/homepage/"
        }
    },

differentiated from a Chrome Packaged App where the app tag would typically contain a background section for javascript. The simplest way to create a packaged app is using a webview as suggested by Sarah Elan in her answer.

Chrome Hosted Apps are not valid as kiosk_enabled as reported by your error message in Chrome under Windows. Only packaged apps are valid for kiosk usage.

Unfortunately the situation seems to currently be that there is:

  • No definitive documentation (that I can find) that Hosted Apps cannot be kiosk_enabled.
  • No validation of the above fact when you upload to the CWS so invalid apps can be in the CWS and even assigned to be kiosk apps in the Google Apps administration interface - only to fail later. I have a an open problem report with Google for these items and will fix this answer if and when there is a resolution to it.

It would seem another way for you to achieve what you want would be to use Public Sessions as apposed to Guest mode. This should allow you to control the initial page(s) opened in Chrome and provide an environment for your students that can be restricted, even if not as restrictive as kiosk mode.

这篇关于如何创建以信息亭模式有效地充当启动页面的Chrome应用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆