google-chrome-app

Is it possible to get an Id token with Chrome App Indentity Api?

我怕爱的太早我们不能终老 提交于 2019-11-27 13:43:12
I can't get a user's id_token ( https://developers.google.com/accounts/docs/CrossClientAuth ) from the Chrome identity api ( https://developer.chrome.com/apps/identity ). I can get an access_token using the chrome identity sample when the oauth section in the manifest is: "oauth2": { "client_id": "<chrome-app-client-id>.apps.googleusercontent.com", "scopes": ["https://www.googleapis.com/auth/plus.login"] } But when I try to get the id_token the same way I get it on my android client a get the error: "OAuth2 request failed: Service responded with error: 'invalid scope: {0}'"} The manifest

Is there an API for the chrome://webrtc-internals/ variables in javascript?

时光总嘲笑我的痴心妄想 提交于 2019-11-27 13:12:44
问题 I want to get access to some of the logged variables in the chrome://webrtc-internals/ , but I didn't find anything on google - not even a description of the graphs I can see. I am particularly interested in packetsLost , googCurrentDelayMs and googNacksSent . why I want to access the webrtc-internals I am writing a google chrome application that shares a video stream (p2p). It uses peerjs to share the stream with other peers, which in turn uses googles webrtc implementation underneath. To

Unchecked runtime.lastError when using Chrome API

╄→гoц情女王★ 提交于 2019-11-27 08:17:04
I use chrome.fileSystem API in my app to open a file. When I click the Cancel button of the file chooser dialog, an error occurs: Unchecked runtime.lastError while running fileSystem.chooseEntry : User cancelled How to fix this error? This error is not important in this case, but I'll explain it and how to get rid of it. What is this error? Chrome APIs are mostly asynchronous: you have a callback that is called when the operation completes. In case of chrome.fileSystem.chooseEntry , the chosen entry (or entries) will be passed to a callback: chrome.fileSystem.chooseEntry( {/* options */},

Close event for chrome.app.window

你。 提交于 2019-11-27 05:45:58
问题 When a chrome app window is closed, is it possible to detect the event? and do an action before the window is closed? 回答1: chrome.app.window.current().onClosed allows you to register an event listener for when a window is closed. 回答2: Vincent's answer will work in some cases, but the documentation warns that some chrome api functionality will be lost by the time the onClosed event is fired. Note, this should be listened to from a window other than the window being closed, for example from the

Subscribe to Topics in FCM for Chrome

穿精又带淫゛_ 提交于 2019-11-27 04:49:19
问题 I am working on sending push notifications with FCM. I am able to send notifications successfully to a set of devices when I know their IDs. But now, I want to send notifications to a topic as mentioned here: https://firebase.google.com/docs/cloud-messaging/topic-messaging They have documented the server side pretty well. But I am not sure how to subscribe to a topic on the client side ( My client includes chrome packaged app, web browsers, ionic based mobile application for different

How to use “system_indicator” in the manisfet of a Chrome Packaged App?

徘徊边缘 提交于 2019-11-27 04:32:53
问题 I'm trying to create a Chrome package App with an icon in the system menu bar as explain here : https://docs.google.com/document/d/1QhhfR33Y28Yqnnoa_Sl3fnZK_mKtwt4dZe6kNyJ_MjU/edit , The Google Hangout App can implement this feature (it's not exactly the same behavior) but I don't find any good documentation to do the same. In the manifest page of Google Packaged App, we can see the field "system_indicator". Is it what I'm looking for ? When I try to set this field to an url of an icon,

can we get chrome browsing history/bookmarks in our android app

廉价感情. 提交于 2019-11-27 03:36:29
can we get chrome browsing history/bookmarks like we get in default browser using READ_HISTORY_BOOKMARKS permission? PS:I Just want to know is it possible? Yes it is very much possible. Use this uri: content://com.android.chrome.browser/bookmarks instead of Browser.BOOKMARKS_URI String[] proj = new String[] { Browser.BookmarkColumns.TITLE,Browser.BookmarkColumns.URL }; Uri uriCustom = Uri.parse("content://com.android.chrome.browser/bookmarks"); String sel = Browser.BookmarkColumns.BOOKMARK + " = 0"; // 0 = history, 1 = bookmark Cursor mCur = getContentResolver().query(uriCustom, proj, sel,

Unable to trigger chrome.browserAction.onClicked.addListener with google chrome extensions

旧时模样 提交于 2019-11-27 03:24:00
问题 I'm a bit stuck here and was wondering if anyone can point out where I might be wrong. I am simply trying to make the body color change to red on click of the app icon. manifest.json { "name": "Bagde", "description": "", "version": "1", "manifest_version": 2, "background": { "scripts": [ "background.js" ] }, "browser_action": { "default_title": "Test", "default_popup": "popup.html" } } popup.html <html> <head> <script src="popup.js"></script> </head> <body> <p>Some Content ..</p> </body> <

Disabling inspect element, right click and F12 in google chrome

被刻印的时光 ゝ 提交于 2019-11-27 01:58:28
问题 Is there a way to disable inspect element, right click and F12 in google chrome? 回答1: This is definitely not possible to do from a web page. Even if you disable right click and disable the default behaviors for F12 , Ctrl+Shift+I , and Ctrl+Shift+J , there is no way to stop a user from opening Dev Tools on a different page and navigating to your page with Dev Tools already open. Also, you can access Dev Tools by going to Menu > Tools > Developer tools , which cannot be prevented by any

How to read a properties file in javascript from project directory?

大城市里の小女人 提交于 2019-11-27 01:57:49
问题 I'm building a Chrome Packaged App. I want to put the script configuration if a config file in a resource directory and on startup want to read that by Javascript. For example Project WebContent index.html manifest.json main.js resource config.properties Here I want main.js to load config.properties file in the beginning and get key-value pairs. Have anyone done something like this? 回答1: There is a super simple way to do this, along the lines of sowbug's answer, but which doesn't need any XHR