How can I send a message from Google Chrome extension to desktop application?
Asked Answered
J

3

14

I have a Windows desktop application which must work in collaboration with my Chrome extension.

Can I send a message to my desktop app somehow from Google Chrome extension?

Which IPC objects can I use?

Joinder answered 21/8, 2012 at 13:51 Comment(0)
Q
11

I see three options:

  1. You could use the internet. You can have a remote service that both the chrome extension and your desktop app talk to, to communicate.
  2. You could have your desktop app have a simple server built into it so that the chrome extension can make local http requests to it to communicate with it.
  3. Use the Google NPAPI plugin functionality to have full access to the computer. Now deprecated
Quijano answered 21/8, 2012 at 14:27 Comment(1)
nice idea about local http server!Joinder
A
9

These days you would use Chrome's native messaging API to send the message from your extension to a native messaging host. The latter can be a "real" executable that then passes the message on to your desktop application.

Documentation: http://developer.chrome.com/extensions/messaging#native-messaging-host

Anteversion answered 3/3, 2014 at 17:21 Comment(0)
J
3

chrome extension has a native massage api to communicate to native process,

see here:

https://developer.chrome.com/apps/nativeMessaging

Jayme answered 3/9, 2016 at 17:43 Comment(1)
This is the link for extension: developer.chrome.com/extensions/nativeMessagingEstellestella

© 2022 - 2024 — McMap. All rights reserved.