How can I communicate with serial port in Firefox? - applet

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...

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.

Using an unsupported API in Android Wear

I'm really keen to develop a web browser application for Android Wear devices. To make such application I need a WebView object, but the major problem is that Google has made the android.webkit API unavailable in that OS.
Since Android is open-source, is it technically possible to manually include the needed libraries, by coping them from the android source code on GitHub into my project? Are they going to work like as in a normal Android device, and is it legal?
Here is the link to the API I'd like to use.
Developing a browser based on WebView is not a good idea anyway. Although historically Android Browser was based on WebView, it had to use a lot of hidden APIs in order to work. All more or less functional browser apps based on WebView have to do the same, which makes them fragile. Also, the resulting browser app will not be as secure as a real multi-process web browser.
A better idea is to take Chromium and build it using Wear SDK. And there is already one built this way.
You don't have access to a complete source for Android Wear to build a complete image.

communication between chrome extension and desktop app?

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.

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.

Can the browser access to camera (independent of OS) and other applications on the laptop?

we want to create an internet platform, where for registered users the following is done:
1) Tracking of the applications they open during they are "checked in" on the page
2) Tracking of their web surfing
3) In regular periods a picture is automatically taken by the built-in camera of the laptop (not Smartphone) and uploaded to the platform.
I know, sounds like brave new world;)
Is a server-sided framework like Rails with client code in JQuery sufficient for it?
Or is an own client application in e.g. objective-C for MacOS necessary?
Thanks,
R
You can do 2 using almost any of the web application frameworks + javascript.
1 is impossible unless the there is an application running in the desktop or a browser extension that is communicating with your website.
However the 3 sounds very alarming from a privacy standpoint. But if the users are willing and is aware of it then it's not an issue.
As far as I know, JavaScript does not natively support accessing the web camera. But Flash does!
Fortunately for you there is a library which combines both Flash and JavaScript that can take a web cam snapshot. It's called jpegcam. There seems to be another one called jquery web cam plugin. Also read this question - https://stackoverflow.com/questions/3922723/using-a-webcam-with-javascript