google-chrome-app

Is it possible to message the dev-tools panel from within inspectedWindow.eval?

旧城冷巷雨未停 提交于 2019-12-06 15:34:03
问题 I have been reading over the chrome extension message passing documentation, but I cannot seem to establish communication from within the inspected window. For example, chrome.devtools.inspectedWindow.eval('function() { . . . /* send message to dev-tools panel */ chrome.runtime.sendMessage({foo:"foo"});<-- Uncaught Error: Invalid arguments to connect. Why is the extensionId required within chrome.devtools.inspectedWindow.eval? This made me step back and ask the question. }') I have tried

IndexedDB callback not updating UI in angularjs

纵然是瞬间 提交于 2019-12-06 13:31:57
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 loaded. I tried $scope.apply(), but it throws error saying apply() is not available. Please help. Since

Speeding up the Chrome App Development Process

霸气de小男生 提交于 2019-12-06 13:22:05
Currently, my development process is: 1. zipping my code 2. uploading it at https://chrome.google.com/webstore/developer/dashboard , clicking publish 3. repeatedly clicking on "update extenstions now" at chrome://extensions/ to update the app which can take up to 60 minutes. Is there a better way to do this? Waiting upto 60 minutes make dev very slow. The official documentation shows how to use developer mode to quickly load and launch your app/extension without having to finalize a distribution package: Open chrome://extensions from the Chrome omnibox or via Settings and enable [x] Developer

Do 'Chrome Apps for Mobile' use native web-view on each platform?

萝らか妹 提交于 2019-12-06 11:47:45
问题 Is Chrome Apps For Mobile only a collection of Apache Cordova plugins for each mobile platform or does it intend to also replace the native web-view with Chrome based web-view ? This question and this slide on Google Docs seem to indicate that it is only a collection of plugins. This question says that on iOS it uses the native web-view. What about on Android and any future platforms Google might support? 回答1: Yes, all current Chrome Apps for Mobile using the cca toolkit are cordova based and

Why I get an undefined object when I use chrome.bluetooth.getAdapterState?

牧云@^-^@ 提交于 2019-12-06 11:18:10
I'm using Google Chrome 33.0.1729.3 dev on Linux (elementary os 0.2 based on Ubuntu 12.04) I create a Chrome App and configured the manifest.json to grant bluetooth permissions: { "name": "App Name", "description": "App Desc", "version": "0.1.0", "app": { "background": { "scripts": ["background.js"] } }, "permissions": ["bluetooth"], "icons": { "16": "app-icon-16.png", "128": "app-icon-128.png" } } when I trigger this script on the app chrome.bluetooth.getAdapterState( function( result ) { console.log( result ); }); The result is an undefined According to the documentation of Google Chrome

Can I get intellisense for chrome apps and extensions?

此生再无相见时 提交于 2019-12-06 09:52:12
Is there any way to get javascript IntelliSense for developing Google Chrome apps and extensions in Visual Studio 2012? You can include this file found at GitHub: chrome.intellisense.js place the file in the same directory as the file you are working on and add the following line at the top of your source file. /// <reference path="chrome" /> This also works in VS 2013 and should work in Visual Studio 2010 and 2013 as well, but is not tested. 来源: https://stackoverflow.com/questions/21493495/can-i-get-intellisense-for-chrome-apps-and-extensions

Trying to capture desktop image using getUserMedia and canvas

跟風遠走 提交于 2019-12-06 09:43:40
问题 I am making an chrome extension through which I can get a screenshot of user's desktop. I am using chrome.desktopCapture API to get stream of selected window. I am creating video element dynamically. Once its source it set, I invoked the play() method. Then I created a canvas element and used it to draw an image of video. I am also able to get the dataURL using canvas.toDataURL() but when i open this url I see no image. And also this URL value remains same even during new capture. Manifest

Chrome extension: How to sendMessage form background to background?

时光怂恿深爱的人放手 提交于 2019-12-06 09:24:13
My background listener is chrome.runtime.onMessage.addListener(function (request, sender, sendResponse) In chrome.contextMenus.onClicked listener, I want to use the message system,I call chrome.runtime.sendMessage in the listener, but it's not works. So, how can I sendMessage from background to background ? Messages dispatched by a page are not received by the same page. If you want to be able to re-use the onMessage listener, put it in a separate function. For example: function alwaysDoSomething() { console.log('Done something!'); } chrome.runtime.onMessage.addListener(function(message,

one more time about: Error: Attempting to use a disconnected port object, how to?

不想你离开。 提交于 2019-12-06 08:14:54
here is my setup background.js var port = null; function setPort() { chrome.tabs.query({active: true, currentWindow: true}, function (tabs) { port = chrome.tabs.connect(tabs[0].id, {name: "CONTENTSCRIPT"}); }); } // when i click on something, get the port and send a message function clickHandler(e) { setPort(); if (port) { port.postMessage({key: 'message', value: true}); } } contentscript.js chrome.runtime.onConnect.addListener(function (port) { if (port.name == "CONTENTSCRIPT") { port.onMessage.addListener(function (msg) { console.log(msg); }); } }); what i am doing is clicking on a

Chrome App usb DigitalPersona fingerprinted reader not found

廉价感情. 提交于 2019-12-06 07:43:18
I'm trying develop Google Chrome App(or extension, not sure) to use DigitalPersona fingerprint reader on Windows. Following : https://developer.chrome.com/apps/usb https://github.com/GoogleChrome/chrome-app-samples/tree/master/usb var DEVICE_INFO = { "vendorId": 1466, //0x05BA "productId": 10 //0x000A }; chrome.usb.findDevices(DEVICE_INFO, call_method); Result is "App was granted the 'usbDevices' permission, but device not found". p.s. the usb information above was found in windows device manager. Don't know why this happened. Does Google Chrome not support DigitalPersona fingerprint reader? p