communication between chrome extension and desktop app? - sockets

I am developing a chrome extension which needs to communicate with a desktop app (non-web). The app uses winsocks so ideally the chrome extension should use some raw socket API for input/output.
The socket API seems still experimental, though. What are my other options?
In a similar Firefox extension, I used nsISocketTransportService, nsIScriptableInputStream and nsIInputStreamPump to achieve the purpose.
I am looking for some equivalent in chrome. Thanks.

Related

Making Chrome web app standalone desktop program

Google announced that they drop support for web apps in Chrome.
Basically, web app is a local HTML/CSS/JS app that runs in a separated custom "standalone" Chrome window.
Is there any way (preferably easy), to convert this web app to a real desktop app that not depend on Chrome in anyway? Using maybe NodeJS? If yes what is the right way to do it?
Thanks.
You could try one of these tools:
https://applicationize.me/
https://www.bzgapps.com/coherence
https://fluidapp.com/ (for Mac only)
Don't know about "easy", but it seems to me that the natural evolution is to Electron or NW.js, and both of these are mentioned in the Google blog article on this subject. (I'm moving to Electron.) Both have advantages over Chrome Apps, mostly that they are true desktop applications. To cite one example, you can now manipulate the menu bar, something out-of-bounds for Chrome Apps.
Pure JavaScript code in your Chrome App, such as anything to access the internet, should move over directly. Same for much UI stuff, as you're still using a browser window for the UI. The app will, however, have to be restructured.
Added Note: Chrome Apps ran on 4 platforms: MacOS, Windows, Linux, ChromeOS. Electron and NW.js apps won't run on ChromeOS. So, the ability to write a four-platform completely binary-portable app is going away.

How can I communicate with serial port in Firefox?

I have already developed a Chrome App and Extension to communicate with serial ports of a client using API from https://developer.chrome.com/apps/serial.
Currently I do the same operation in Firefox through a Java applet.
Since support for Java applet will be deprecated soon, I would like to develop an addon for Firefox for this.
The real problem is that I can't find any documentations in https://developer.mozilla.org/en-US/docs/Web/API for an API able to work like the Chrome serial.
Since you tagged this as "Addon SDK" question, I will assume you're trying to develop an extension using the SDK. The way to do it there would be to have a binary that communicates with the serial port and use system/child_process to communicate with that binary from the extension.
Maybe you have a look at jUART? They support Chrome, Firefox and also plan an IE version. If *avaScript is not the right thing for you maybe you have a look at the firefox plugin implementation and get some inspiration how they did it...

Building app, mobile web app and desktop web app using Ionic

We will develop an app that we would like to distribute in through the following channels:
Android and iOS apps through Google Play and iTunes (the app will
use notifications extensively and presence in Google Play and App store is required)
Web app to run in web browsers on mobile devices
Web app to run in web browsers on laptop and desktop computers. We would like to support Chrome, Internet Explorer (starting from IE9),
Firefox and Safari browsers.
Our understanding is that Ionic is developed targeting primarily 1. and that the web apps in 2. and 3. above are not really what Ionic is intended for. We have looked around to try to understand if Ionic likely works for 2. and 3. and also made some quick tests ourselves.
From one of the links at the end: "Your webapp will run in desktop browsers yes, as it is made of html, css and javascript. The phonegap specific javascript calls (accelerometer, compass, file, etc) won't. Basically, if you stick to standard yes you will be able to port relatively easily your app to most browser, the job at this point being mostly a work of theming."
From another one: "I do know that FireFox is simply not supported. I don't know how well Ionic works in IE X."
To try it out we have built a limited version of our app in Ionic. From what we can see the app works for 1, 2 and 3. For example, it runs without issues on FireFox that is mentioned as not supported in the quote above. This means that to us it looks like the first quote saying that the web app will work in desktop browsers is correct.
I understand that this is a fairly generic question and might be hard to answer, but since we have found contradicting information when looking we are trying to understand more before making a decision.
Any feedback would be appreciated.
Thanks,
Markus
Is it a good idea to use ionic to build mobile web version of a website?
Can Ionic Framework run in desktop web browser like Chrome, Mozilla, IE9+?
http://forum.ionicframework.com/t/ionic-components-on-ie/1826
Phonegap web app in regular desktop browsers
http://ionicframework.com/docs/overview/#css-sass
Ionic is tested for mobile only. Internet Explorer for example is not tested and does not properly handle a number of features in Ionic. Desktop browsers act differently than mobile browsers.
Ionic is focused on building native/hybrid mobile apps rather than
mobile websites.
As such, our browser support tends to be whatever Web View API is
available to native apps on a given platform. For Ionic 1.1.0
"xenon-xerus", that means UIWebView for iOS 7+, and Android 4.1 and
up. Windows Phone and FirefoxOS support is on our roadmap.
If it's cheaper for you to test everything on all different desktop browsers than to develop a version for it sharing the same controllers and services --- go ahead but it won't come "out of the box".
Also, I recommend looking at Electron to build desktop apps from webapps.
ionic is targting mobile apps only , but you can develop your desktop app using node webkit and angular material for example and share some code between your apps

Can the Anymote library be implemented in a Google Chrome extension built on GWT?

I have built the UI for my Google Chrome Extension, but I am trying to figure out how to implement the anymote library within a GWT web-app. Is this even possible to accomplish?
We'll be talking a bit more about this in an upcoming Google IO talk (6/28/2012). The talk is about control from the second screen which will include Chrome Extensions.
https://developers.google.com/events/io/sessions/gooio2012/1301/
I've seen it done, but don't believe the source has been made available.

What technology can I use for achieving native socket support in Google Chrome apps?

What technology - besides NPAPI - can I use for achieving native socket support in Google Chrome apps?
Flash is not an option, as I assume it requires a policy file.
What about NaCl and/or Pepper?
No (or at least not yet), because of the web's security model, but you might be interested in workarounds such as Orbited.