How can I send a message from Google Chrome extension to desktop application? How can I send a message from Google Chrome extension to desktop application? google-chrome google-chrome

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


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


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