blocshop / sockets-for-cordova

Cordova plugin for socket network communication
136 stars 126 forks source link

Need support firefoxos platform #15

Open ettoolong opened 9 years ago

ettoolong commented 9 years ago

See pull request https://github.com/blocshop/sockets-for-cordova/pull/14

Need any other modify?

mobratil commented 9 years ago

Hi,

thank you very much for your request. I need to review it first. Unfortunately, I don't have any firefoxos device (I'll try some emulator), but I thing I can merge it with our master branch, as experimental support for firefoxos.

I have one question for now. You left comment in firefoxos/SocketProxy.js file, that we should modify config.xml. Could you modify that file?

ettoolong commented 9 years ago

Hi,

I try to modify config.xml, Add below setting:

then I build my demo-app

$ cordova platform add firefoxos $ cordova build firefoxos

and check app/platforms/firefoxos/www/manifest.webapp

permissions settings not be add to manifest.webapp :disappointed:

we need permission setting like below to enable tcp-socket: "type": "privileged", "permissions": { "tcp-socket": { "description" : "Create TCP sockets and communicate over them." } },

I add them to manifest.webapp manually. How to make Cordova do this automatically? Does I make something wrong in my config.xml?

I found some issue here: https://issues.apache.org/jira/browse/CB-9407

about firefoxos simulator, see: https://developer.mozilla.org/en-US/Apps/Tools_and_frameworks/Cordova_support_for_Firefox_OS

Install firefoxos simulator:

  1. Install Firefox on PC.
  2. Run Firefox > Main menu > Tools > Web Developer > WebIDE
  3. Select Runtime > Install simulator > Install (Firefox OS 2.0) After install simulator
  4. Select Runtime > Firefox OS 2.0
  5. Open App > open packaged app (path: app/platforms/firefoxos/www/ ) 6 Click 'Install and Run' button.