google-chrome-app

Implement cross extension message passing in chrome extension and app

烈酒焚心 提交于 2019-12-11 18:58:10
问题 I am trying to do cross extension message passing between chrome extension and chrome app according to this article. But I am not sure that how to do it correctly. I used background js to receive and send messages. But no clue whether it is working or not. Actually I want to save file from chrome extension, since it cannot be done I thought this could work. So any idea or suggestion or example is highly welcome. I have go through many alternatives as also appears in this question. Then one of

Saving a file from a chrome packaged app

你。 提交于 2019-12-11 18:08:58
问题 I have a Chrome packaged app that has taken me a while to get my head around but I finally have it working. However I have now come across another problem. Is it possible to save a variable from my app into a text file that's placed in my app/file directory? I have looked over the chrome.fileSystem api but I don't really understand it. I could be completely wrong and maybe you can't save files to the file directory? Any examples or tutorials on this would be great! Thanks! 回答1: I would

Chrome App Persistent Filesystem Storage not reliable

徘徊边缘 提交于 2019-12-11 18:04:42
问题 I am having issues with my google chrome app and filestorage. The app is run online and gathers files to store offline so that it should be able to function properly offline later. It does this for the most part but sometimes but rarely after a computer restart or restarting the browser it seems to be missing the files in filesystem... I guess my question is, how do i ensure that Persistent storage remains persistent? Edit: Code Request filesystem window.requestFileSystem = window

Why does Chrome stop updating chrome app? (log files/errors included)

╄→尐↘猪︶ㄣ 提交于 2019-12-11 14:06:15
问题 I've created a packaged app. I've properly set the update_url (I confirmed this as the first time it updates) but if I update the app (either via clicking the button "update extensions now" or via chrome.runtime.requestUpdateCheck(..) ), twice in a row, it does not update the second time! When I do it via chrome.runtime.requestUpdateCheck(..) , and check the status, it shows as "throttled" ! After that, even if I click the manual button, it will not continue to update. This is making

Is it possible to access printer installed in network in Google Chrome Packaged App?

。_饼干妹妹 提交于 2019-12-11 13:04:29
问题 I am building a Google Chrome Packaged App. I have a requirement to access printer available via a "Closed" Network (not connected as USB). Obviously Chrome Cloud Print API is NOT my option, since I'm talking about "Closed" network, hence no internet access (besides I need to print very fast, so even if I had internet I could not afford to go via Cloud and wait few seconds to print.). I have done my research, so far this seems to be NOT possible in Google Chrome Packaged App. Please let me

how to send data to usb hid via chome app/javascript

泄露秘密 提交于 2019-12-11 12:31:31
问题 I succefully connected to mydevice (ps 3 pad) via usb and easily can intercept data depending on which button i press. But pad also can vibrate and has leds and i'd like to operate them as well so here as the questions: though google manuals are really poor i tried to establish connection to device on my own: var message = new Uint8Array(58); message[0] = 1; console.log(message.buffer); chrome.hid.send(connectionId, reportId, message.buffer, function() { console.log('accomplished') }

authorize chrome app as standalone in vkontakte api

坚强是说给别人听的谎言 提交于 2019-12-11 11:44:51
问题 I'm trying to use vk.messages api in chrome app like this: app.login = function () { var link = 'https://oauth.vk.com/authorize?' + 'client_id=4837072' + '&scope=friends,docs,status,messages,notifications,' + '&redirect_uri=' + 'https://oauth.vk.com/blank.html' + '&display=popup' + '&v=API_VERSION' + '&response_type=token'; var width = 655; var height = 539; var left = (screen.width / 2) - (width / 2); var top = (screen.height / 2) - (height / 2); chrome.identity.launchWebAuthFlow({ 'url':

How to do a synchronous XMLHttpRequest in Chrome App?

浪子不回头ぞ 提交于 2019-12-11 11:36:20
问题 Using the following code: var xhr = new XMLHttpRequest(); xhr.open('GET', url, false); Yields the following error: Uncaught InvalidAccessError: Failed to execute 'open' on 'XMLHttpRequest': Synchronous requests are disabled for this page. Is it simply not possible, or am I doing it wrong? Do I need extra permissions? 回答1: Synchronous XMLHttpRequests are disabled by default for Chrome apps. Check this link to see all disabled web features and the workarounds. For this case: Use async-only

Can't get Chrome Context Menu item to show on Chrome Extension

拈花ヽ惹草 提交于 2019-12-11 11:23:14
问题 I have a Chrome extension that opens a KML/KMZ file in Google Maps. The extension is triggered when the user right-clicks a link to the KML document. But the context menu does not appear. It uses a background script. Here is the manifest.json : { "manifest_version": 2, "name": "KML/KMZ Viewer", "version": "1.0.0", "description": "Can be used to view KML/KMZ Files.", "icons": { "19": "tiny.jpg", "24": "icon.png", "128": "image.png" }, "permissions": [ "tabs", "contextMenus", "activeTab",

I want to create a native app that runs in all OS, and can run terminal commands

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 11:12:27
问题 Can this technology Chrome App or Google NaCl provide me with this capabilities? Basically it should be able to run terminal commands (even by asking permission first). And it needs to be able to edit client's filesystem. I am interested in Chrome App or Google NaCl because they both can run in any operating system (that supports chrome). 回答1: According to Google, Chrome is supported on some Linux, Mac OS X and Windows. As your need is not strictly related to Chrome neither a browser, I