How to communicate between Firefox addon and android process?
I want to write an Firefox mobile addon, which needs to communicate or invoke some android program with some data. I want to know what is the best way to communicate between an Firefox addon and android process. One way I can think of is to write data on Clipboard from addon, and continuously poll for clip开发者_开发技巧board from the android process, but that is not the efficient way. So any other ideas, please.
Unfortunately, there isn't a public way to communicate between Firefox and Android. We have been discussing how to expose such a mechanism.
In the meantime, I have been able to communicate with other applications using sockets. For example, the Android Scripting Layer (http://code.google.com/p/android-scripting/) can act as a RPC server. I have been able to open a socket to the server and communicate that way.
The FoxToPhone allows to send data from the browser to android device. Could be a good example to follow.
In the meantime, the cloud to device allows to send data from the cloud to a phone.
Maybe a combination of both services could do the trick?
You could use WebSockets in your FF extension and Sockets in your android app.
Or another solution is to include a servlet (appengine) between the extension and the app.
精彩评论