Coder Social home page Coder Social logo

phonegap-websocket's Introduction

Websocket PhoneGap plugin for Android

Phonegap plugin which adds support for websockets under Android. The websocket client is based on Java-WebSocket.

Features

  • supports multiple protocols / drafts
  • compatible with Phonegap 3.x and installable via PhoneGap (or Cordova) CLI.
  • works well with socket.io and other WebSocket libraries.
  • supports WSS
  • supports binary data
  • falls back to native WebSocket in KitKat

The older version of the plugin (PhoneGap 2.x.x) can be found here: https://github.com/mkuklis/phonegap-websocket/tree/phonegap-2.x.x

Installation

Inside your phonegap project:

cordova plugin add https://github.com/mkuklis/phonegap-websocket

Or using the phonegap CLI:

phonegap local plugin add https://github.com/mkuklis/phonegap-websocket

Demo

You can find demo based on this plugin and socket.io here:

https://bitbucket.org/mkuklis/phonegap-websocket-demo

Note

If you plan to test it locally from your emulator please make sure to use 10.0.2.2 ip address when connecting to your local server.

If you plan to run it from your phone please make sure to update your config.xml file and add your server's IP address to the access tag (e.g. <access origin="YOUR_IP_ADDRESS:YOUR_PORT" /> ) More information can be found here.

Contributors

##License:

The MIT License

phonegap-websocket's People

Contributors

fancycode avatar fbeauchamp avatar juniorz avatar makc avatar mkuklis avatar mwbrooks avatar remy avatar sebastien-p avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.