I have seen this article about passing messages between extensions which works when you know the extension ids.
But, what I would really like to do is pass a message from a packaged app to an extension.
I tried to implement the steps in the article above. But i received the message that chrome.extension is not defined.
I assumed this is because it is a packaged app, that it doesnt have chrome.extension.
Is there a way to do this?
Thanks
AH
You should be able to accomplish via Web Intents, specifically the "explicit" variant that can be targeted at a specific app/extension. See this sample in the apps repository for two apps that communicate via explicit Web Intents (the same concept can be applied to an extension and an app, except the extension would receive intents via a URL specified in the manifest).
Cross-extension messaging
In addition to sending messages between different components in your
extension, you can use the messaging API to communicate with other
extensions. This lets you expose a public API that other extensions
can take advantage of.
Listening for incoming requests and connections is similar to the
internal case, except you use the runtime.onMessageExternal or
runtime.onConnectExternal methods.
http://developer.chrome.com/dev/extensions/messaging.html
Related
Case: Google Chat support in node.js using the googleapis library.
I studied the documentation, created a service account and implemented authentication. In first step I used the chat.spaces.list() method and it worked (no error returned).
I want to send a message via chat, so I wanted to create a new space, I found the chat.spaces.create method (https://developers.google.com/chat/api/reference/rest/v1/spaces/create) Unfortunately, this method is not present in "googleapis" for node.js In general, I see that the list of methods in "googleapis" is different than the one in the documentation. Only spaces in the documentation, but spaces and rooms in the library... I'm lost. How to do it? Any tips?
I see that the list of methods in "googleapis" is different than the one in the documentation
I think you are seeing wrong documentation. Your reference link is REST API documentation. The nodejs googleapis client documentation you can see on https://googleapis.dev/nodejs/googleapis/latest/chat/classes/Resource$Spaces.html.
And also based on the REST API documentation, the API that you looking for(create space) is not general available.
† Supports user authentication in Developer Preview. App authentication isn't available.
You need to join Google Workspace Developer Preview Program to access that feature.
Since manifest version 3, background scripts (now known as service workers) aren’t persistent, so I can’t think of a way to register a listener (e.g. web socket) that will receive notifications from my server.
I read about the chrome.gcm API, but I understand GCM is deprecated (and unusable) in favor of FCM.
Is it possible in any way to send messages from my server to my Chrome extension?
chrome.gcm API is in fact using firebase under the hood, there's a bug report in chromium to address the documentation issues and add self-explaining alias to the API methods - https://bugs.chromium.org/p/chromium/issues/detail?id=1337382
I'm trying to use the Assistant2 APIs inside my Web Application (Angular CLI project) with the ibm-watson library and the suggested Webpack Configuration.
But at runtime I get different CORS policy errors calling the Assistant2 APIs.
So it's possible to use the Assistant2 APIs via browser?? Or calls must be all made server side to avoid the CORS policy errors?
Well, Watson Assistant provides REST API that can be called from anywhere where there is access to IBM Cloud (which bacicaly means access to internet) - so from browser as well.
Now, while you can call the Watson Assistant REST API directly from the client-side browser, sometimes it might be beneficial to have a server doing the actual call as when you call the REST API from the browser then the user has access to the request and the response from the system. This means the user has access to context part of the dialog response which in some cases might not be desired (depends on the stuff that the author is storing in the context).
I have a system where various rss feeds are added. I want to follow the content and be notified when new content is added in the feeds without having to check them one by one.
I found out there is a pubsubhubbub protocol and that publishers can use various hubs which implement this protocol in their feeds. This is how I found out about superfeedr and I'm trying to work with their XMPP API. I installed their nodejs library and made a few subscribe tests that worked fine.
Is it possible to use the node superfeedr module to subscribe to a feed that doesn't use superfeedr? For example I found one that has:
link rel='hub' href='http://pubsubhubbub.appspot.com/'
Do I have to handle each hub separately or I can just send them the same requests based on the protocol?
Alex, I created Superfeedr.
Yes, of course it is possible to subscribe to a feed that doesn't use Superfeedr. Superfeedr acts as a default hub. You can add any feed, and you should get notifications for it. The only difference is that you may see delays. We poll feeds every 15 minutes, so, unless there are strong caches, you should see messages no later than 15 minutes after they've been published.
2 and 3 are probably not relevant given 1. However, I believe there are a couple other PubSubHubbub libraries, but they all require that your endpoint is outside the firewall... and all of them will only work for feeds that use the pubsubhubbub protocol. Even though your application will use each hub separately, the code should be the same, so that's transparent for you.
I hope this helps.
I need to implement a browser plugin which can register its own protocol (like someprotocol://someurl) and be able to handle calls to this protocol (like user clicking on 'someprotocol' link calls function inside my plugin). As far as I understand, Skype does something similar, except I need to handle links within page context and not in a separate app. Any advice on how this can be done? Can this be done without installing my own plugin, with the help of flash/java?
Things are going to be slightly more complicated than you think.
You're going to have to create an entire application, not just a browser plugin (that plugin can be part of your application). The reason I consider it to be a complete application is that you're going to need to modify registry settings on the client machine to register your custom URL handler.
Here's an MSDN article describing exactly what you have to do to register the custom URL handler on a Windows client:
Registering an Application to a URL Protocol