google-chrome-app

Chrome Apps, FileSystem API: chooseEntry method isn't working

好久不见. 提交于 2020-01-17 03:26:05
问题 Edit: Found the error, but can't solve it, see below. manifest.json { ... "offline_enabled": true, "app": { "background": { "persistent": true, "scripts": [ "/js/background.js" ] } }, "permissions": [ "notifications", "storage", {"fileSystem": ["directory"]} ] } background.js chrome.app.runtime.onLaunched.addListener(function() { window.open('/index.html'); }); index.html <!DOCTYPE html> <html> <head> <title>Achshar Player</title> <script src="/js/index.js"></script> </head> <body> <input id=

Mock GPS location and Chrome for Android

霸气de小男生 提交于 2020-01-16 12:03:20
问题 I have a Trimble ProXT GNSS receiver that has Bluetooth and can connect to android using the Trimble GNSS Status app. The app outputs the location of the base unit and if I select the app as the mock location provider in developer options it works great in all native apps but if I try using a web app that's using the html5 geo location API it fails. My GIS data acquisition app is web based and I need this to work! 回答1: I ran into this same issue and was able to get some help from Trimble: I'm

Not getting onReceive callback for UDP socket on chrome after event page is unloaded

孤人 提交于 2020-01-15 11:32:09
问题 I am creating a chrome app (packaged) and I have to create a UDP socket and listen for the incoming broadcast messages as soon as chrome browser starts up. Everything works fine as I start browser , I get the callback registered through chrome.sockets.udp.onReceive.addListener() API and the data as well. The problem starts when the event page is unloaded (after about 10-15 secs). Any new UDP packets are not received. But as seen in Chrome Apps & Extensions Developer Tool , onReceive callback

Chrome app: accessing sandboxed iframe from parent window

冷暖自知 提交于 2020-01-14 13:45:35
问题 I'm using knockoutjs in my google chrome app. To be able to use knockout, I have to define the real application.html as sandox page and include it as an iframe in a dummy container. Application structure is as follows: - container.html | +-- application.html as iframe | +-knockout and application.js Iframe is defined as follows: <iframe src="application.html" frameborder="0" sandbox="allow-same-origin allow-scripts" ></iframe> Running document.getElementsByTagName("iframe")[0] in inspect tool

RSA and AES encryption

匆匆过客 提交于 2020-01-14 08:14:27
问题 I am looking at the feasibility for using Chrome apps for the front end of some applications I am working on. (As an aside, if anyone has any thoughts on this - put it in the comments) I would be using chrome.socket and would want the connections to be secure so will need RSA and AES encryption that will be compatible with as many backend technology implementations as possible (C#, Java, ...). What I mean by this is the different modes, key-lengths, implementation-specific details... Now I

IndexedDB callback not updating UI in angularjs

拈花ヽ惹草 提交于 2020-01-14 02:44:11
问题 I am using the following library to access IndexedDB in Angularjs on a new Chrome App: https://github.com/aaronpowell/db.js When I try to update the UI on App startup by using this : db.orders.query().all().execute().done(function(results) { $scope.ordercount = results.length; }); in my main.html I have used the ordercount variable as: Orders : {{ordercount}} However, the UI is not updating unless I do ng-click or any other ng-* events. All I need is to show number of orders when my app is

JavaScript get permission for Audio.setSinkId

你。 提交于 2020-01-13 03:21:08
问题 I'm trying to change the sinkId at an Audio-Element in a chrome app. Code: var audio = new Audio(); audio.setSinkId("communications"); I'll get this error: DOMException: No permission to use requested device So to get the permission I tried to do that: navigator.webkitGetUserMedia({ audio: true }, (stream) => { console.log("stream: ", stream); }, (error) => { console.log("error: ", error); }); But now I get this: error: NavigatorUserMediaError {name: "InvalidStateError", message: "",

Standalone chrome applications

风流意气都作罢 提交于 2020-01-11 14:32:28
问题 Currently I am exploring the possibilities and features of Google Chrome apps. As I see to run chrome apps we need to distribute them through chrome App Store. Could we develop a application as a chrome app, which will not need to release to general public or for a limited audience? Is there anyway that we could package it to native OS executable like .exe in windows or .app in MacOS. So for users who doesn't have chrome installed will also can without any issue. Or at least could we

Chrome Webstore Extension In App Purchase INTERNAL_SERVER_ERROR

我们两清 提交于 2020-01-11 12:29:08
问题 Partial success with the Chrome InApp purchase flow within a Chrome extension. I have included the buy.js file and implemented the flow as listed on the Chrome walkthrough here: https://developer.chrome.com/webstore/payments-iap Using my live extension, I have run through the flow and it works just fine. My credit card is charged and the callback returns successful, I deliver the item. When I check the google.payments.inapp.getPurchases call I can see the item listed as ACTIVE. However, when

Google chrome - chrome.serial connection failed

那年仲夏 提交于 2020-01-11 11:38:49
问题 I am trying to connect to USB serial which is working manually as below: $ ls /dev/cu.* /dev/cu.Bluetooth-Incoming-Port /dev/cu.usbserial $ screen /dev/cu.usbserial 9600 But when Google chrome apps trying to connect its failing. apps, background.js: var DEVICE_PATH = '/dev/cu.usbserial'; var serial = chrome.serial; function log(msg) { console.log(msg); } var ab2str = function(buf) { var bufView = new Uint8Array(buf); var encodedString = String.fromCharCode.apply(null, bufView); return