google-chrome-app

Chrome app window.onClosed not fired when process ended from Task Manager - Google Chrome

时光毁灭记忆、已成空白 提交于 2019-12-11 05:22:00
问题 We have a chrome app that we keep open by openning again the main window in response to it's onClosed event. However, this event is not raised when the process is ended from Google's Chrome Task Manager. Why is this? Can we get around this so that we can keep the app open? So far, I've just run this on Windows. 回答1: Chrome Task Manager uses a low-level system function to terminate the process, see the source code (1, 2). On Windows it's TerminateProcess, and the documentation says: A process

How to publish HTML5 game in Chrome Web Store

佐手、 提交于 2019-12-11 05:19:06
问题 I have my HTML5 game hosted in www.mygame.com and I followed on this doc the result show only visit website button in Chrome web store: The question is how to add my game shortcut in chrome://apps/ and when users click on game icon will link to www.mygame.com This is my manifest.json : { "manifest_version": 2, "name": "Math Booster", "description": "Try to solve basic math in short time", "version": "1.1", "icons": { "16": "icon16.png", "48": "icon48.png", "128": "icon128.png" }, "app": {

Where is the file sandbox for a Chrome app?

安稳与你 提交于 2019-12-11 04:28:31
问题 I'm developing a chrome app with the capability to handle files. I need to copy these files to the app, which I believe stores it in the app's sandbox. But where are these files, like on my disk? Here's where I get access to the filesystem: fs = null oneGig = Math.pow 2, 30 # 1GB window.webkitRequestFileSystem window.PERSISTENT, oneGig, (_fs) -> # on fs init fs = _fs console.log fs.root.fullPath #=> "/" obviously not right (e) -> # on fs error console.log e Followed by this code to actually

“Chrome Apps” webview.executeScript access guest global varibles

隐身守侯 提交于 2019-12-11 04:28:25
问题 I can access a Chrome App Webview HTML with: webview.executeScript( {code: 'document.documentElement.innerHTML'}, function(results) { // results[0] would have the webview's innerHTML. }); But I would like to get the value of global variables in the Guest like so: webview.executeScript( {code: 'window.globalVar'}, function(results) { // results[0] should have the webview's value of "globalVar". }); How can I do this? 回答1: An answer to summarize the steps required. 1) You inject a content

How to use Audio in a Mobile Chrome App

倖福魔咒の 提交于 2019-12-11 04:16:15
问题 I'm aiming to have a sound occur when the user presses a certain button. This is working on my desktop and in Chrome on my Android 4.4 phone but when I launch this as a cordova app the audio stops working. <audio hidden='true' id='win-audio'> <source src='audio.mp3' type='audio/mpeg' /> </audio> with the following being called when a click event happens document.querySelector('#win-audio').load(); document.querySelector('#win-audio').play(); I have tried using a <video> tag instead (with the

How to create kiosk compatible chrome packaged app

折月煮酒 提交于 2019-12-11 03:59:33
问题 I have a Chrome Packaged App which I wish to deploy and use in a Chrome OS Public Session Kiosk ( Not Single App Kiosk ). From here: https://support.google.com/chrome/a/answer/3017014?hl=en Public Session Kiosk apps All hosted Chrome apps and some packaged apps are supported as kiosk apps. Here are some popular Public Session How do I configure my Chrome packaged app to work in a Public Session Kiosk? 回答1: I Spoke to a Sr Deployment Mgr for Chrome OS @ Google, he told me: Only whitelisted

Google Chrome automatically disables my extension

和自甴很熟 提交于 2019-12-11 03:50:43
问题 I have an extension published in the Chrome Store which some users reported as being disabled without their knowledge. The users of the extension can install it from either the Chrome Store or from our homepage using inline installation. My guess is that there is a of problem relating to the inline installation method, but I'm not sure. Has anyone experienced this kind of behavior? Note: I know Google Chrome disabled hosted 3rd party extensions but as stated we use inline installation. 来源:

Google Chrome App - check if app or regular site

泄露秘密 提交于 2019-12-11 03:23:56
问题 I am working on project which will run as Chrome App & regular site. How can I test/check in my JS if I am in an Chrome App? (i.e. some functionality will only work under chrome) Just FYI, here is my Chrome App manifest, please note I am running this in the developer mode (directly from the source, not packaged yet) { "manifest_version": 2, "name": "Example KIOSK APP", "version": "1.1", "icons": { "16": "images/icon-16.png", "48": "images/icon-48.png", "128": "images/icon-128.png" }, "app": {

How to include jQuery in Chrome app?

给你一囗甜甜゛ 提交于 2019-12-11 02:57:28
问题 I need access to some jQuery methods in my Chrome app, but am unsure how to include the API. I'm new to front-end development and am basically looking for some kind of .h #include parallel to what I normally do with more C-like languages. In my manifest.json, I tried adding a path to a downloaded version of jQuery: { "name": "my first app", "manifest_version": 2, "version": "0.0.1", "minimum_chrome_version": "36.0.1941.0", "app": { "background": { "scripts": [ "./assets/js/main.js", "./assets

How can my web app communicate with serial port

牧云@^-^@ 提交于 2019-12-11 01:33:08
问题 I have a cloud web app using asp web api and angular. Both hosted on azure. I need my angular app to be able to communicate to serial port (read/write). How can I do this? I've read that chrome apps can connect to usb/serial, but i'm still confused of how it works. Should i rebuild my apps to chrome apps, or should i create a seperate apps or can i just write chrome apps that open my actual web and access the serial from my current app? 回答1: You don't have to rewrite your app. Just create a