google-chrome-app

Chrome app create and write to file

狂风中的少年 提交于 2019-12-11 09:54:25
问题 I am attempting to use chrome.apps for a program that needs to write multiple separate log files of data. The user then needs to be able to access these these log files outside of the app in their file system for post processing. This will need to be done many times so minimum to no user interaction would be desired for file generation. While this is simple in any native program code, I've been finding this very difficult to do with chrome apps. E.g. can I use chrome apps to create "log_file

How to allow popup windows and redirects using <webview> in Google Chrome Apps?

試著忘記壹切 提交于 2019-12-11 09:48:39
问题 I have a Google Chrome App that uses a <webview> component. Inside the <webview> , at the URL of the guest, user authentication is handled using a popup and redirect managed by OAuth client in response to a login button onclick event. My problem is that when I click my login button, nothing happens. i.e., No popup. No redirect. No login. How do I fix this to allow the popup and redirect needed by my OAuth implementation? window.html <!DOCTYPE html> <html> <head> ... </head> <body> <webview id

How to send string over UDP using Javascript on Chrome app

青春壹個敷衍的年華 提交于 2019-12-11 08:59:04
问题 i am writing a chrome app, and i want to send some strings over UDP to some server. i'm new to javascript and i'm kinda stuck. this is a snippet of the code: var wholeString = "what is the meaning of life"; chrome.sockets.udp.create({}, function (socketInfo) { // The socket is created, now we can send some data var socketId = socketInfo['socketId']; var arrayBuffer = stringToArrayBuffer("hello"); chrome.sockets.udp.bind(socketId, "127.0.0.1", 0, function (result) { chrome.sockets.udp.send

Using chrome.runtime.sendmessage to communicate from a webpage to a packaged app

非 Y 不嫁゛ 提交于 2019-12-11 08:58:09
问题 I'm trying to communicate from a web page to a packaged app. The idea is to have the web page read a number from a serial device. Because I want to access the serial device, I need a packaged app and can't use an extension. This is pretty similar to Keep Chrome Packaged App running in background? and it seems that Chrome documentation says this is possible. How can I execute the chrome.runtime.sendMessage from a regular web page? When I do so, I get *Uncaught TypeError: Cannot read property

Can I use the Web Speech API in a Chrome app?

↘锁芯ラ 提交于 2019-12-11 08:44:32
问题 Can I use the Web Speech API in a Chrome app? If anyone has any knowledge, please let me know. Thank you 回答1: Chrome Apps have a special TTS API available to them. According to this bug report, the Web Speech API is not available to extensions, but it doesn't say anything about packaged apps. Your best bet is probably to just try it and see if it works. 回答2: According to the Web API section in the chrome apps section: In addition to the chrome.* APIs, extensions can use all the APIs that the

Google Chrome App print slient

浪尽此生 提交于 2019-12-11 08:16:06
问题 It's possible in a Google Chrome App print silent like when Chrome is running in kiosk mode? --kiosk --kiosk-priting 回答1: When you print something in kiosk mode things gets printed automatically to the default printer, silently. Simply call print() in the context of the page you want to print. If you want to print from the background/event page you will need to do something like the following: // ... function closePrint () { document.body.removeChild(this.__container__); } function setPrint (

Chrome app displays blank window and won't do anything

放肆的年华 提交于 2019-12-11 08:09:35
问题 I am at the end of my wits. am developing my first chrome app. manifest.json: { "name": "My App", "description": "My App", "version": "0.1", "manifest_version": 2, "app": { "background": { "scripts": ["background.js"] } }, "icons": { "16": "calculator-16.png", "128": "calculator-128.png" } } background.js: chrome.app.runtime.onLaunched.addListener(function () { // Center window on screen. var screenWidth = screen.availWidth; var screenHeight = screen.availHeight; var width = 1024; var height

Using UDP sockets in Chrome Extensions

亡梦爱人 提交于 2019-12-11 07:58:02
问题 Is it possible to communicate with UDP sockets via Chrome Extensions? I want to be able to have browser actions AND the ability to just send messages to UDP sockets. 回答1: No, it's not possible. You either have to use both an app and an extension that communicate, or use an extension and a Native Host. 来源: https://stackoverflow.com/questions/24886843/using-udp-sockets-in-chrome-extensions

How to know when to use Chrome Dev Tools: Performance vs Memory tab

早过忘川 提交于 2019-12-11 07:39:25
问题 Lets say I have a web app which is slow and I want to identify possible bottlenecks. I First would go into the network tab and see if the server is the problem, if network calls are okay then I should proceed with performance and memory tabs? What is the use case of the performance tab and the use cases of the memory tab? 回答1: What is the use case of the performance tab and the use cases of the memory tab? The Performance panel gives you a complete view of the performance of a page during a

Save a file without the save dialog box in Chrome Apps

人走茶凉 提交于 2019-12-11 06:55:46
问题 In my chrome app, I am writing some data to a file. I used the following code available in the official website under Storage APIs chrome.fileSystem.chooseEntry({type: 'saveFile'}, function(writableFileEntry) { writableFileEntry.createWriter(function(writer) { writer.onerror = errorHandler; writer.onwriteend = function(e) { console.log('write complete'); }; writer.write(new Blob(['1234567890'], {type: 'text/plain'})); }, errorHandler); }); Now I need to avoid popping up the save dialog box,