Skip to content

Commit a55bb33

Browse files
committed
Merge branch 'develop'
2 parents 94c326e + a878bc3 commit a55bb33

File tree

6 files changed

+25
-16
lines changed

6 files changed

+25
-16
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
## Change Log
2+
#### 0.9.1
3+
* updated only documents
4+
25
#### 0.9.0
36
* integrated with jetty-8.1.17.v20150415
47
* performance improvement (about 10% to 25% faster than previous versions)

README.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This is based on [Jetty 8](https://github.com/eclipse/jetty.project/tree/jetty-8
55
## Requirements
66
- Android 2.3 or later (recommended 4.1 or later)
77
- `cordova-android@3.0.0` or later or compatible framework
8-
- `cordova-plugin-whitelist` or `cordova-plugin-legacy-whitelist` (since `cordova-android@4.0.0`)
8+
- `cordova-plugin-whitelist` or `cordova-plugin-legacy-whitelist` if using `cordova-android@4.0.0` or later
99

1010
The plugin for Cordova 2.x can be found [here](https://github.com/knowledgecode/WebSocket-for-Android/tree/2.x).
1111

@@ -27,20 +27,27 @@ The plugin for Cordova 2.x can be found [here](https://github.com/knowledgecode/
2727
- Android 3.x (Honeycomb) are not supported (maybe work, but not tested).
2828
- A new WebView based on Chromium supports WebSockets. Specifically Android 4.4 (KitKat) or later support them, so this plugin is **NOT** used on them by default.
2929
- This plugin can be used [Crosswalk](https://crosswalk-project.org/) together in `cordova-android@4.0.0`. In this case also this is not used by default because it supports WebSockets.
30-
- If target Android 5.x (Lolipop), would be better to build with `cordova-android@3.7.1` or later.
30+
- If include Android 5.x (Lollipop) as target, would be better to build with `cordova-android@3.7.1` or later.
3131

3232
## Installation
33-
Use Cordova Command-Line Interface (CLI):
33+
Use Cordova Command-Line Interface (CLI). At first, check Cordova version:
34+
```sh
35+
$ cordova --version
36+
```
37+
If using 5.0.0 or later:
3438
```sh
3539
$ cordova plugin add cordova-plugin-websocket
3640
```
37-
Can also install this from the GitHub repository:
41+
If using other old versions:
3842
```sh
3943
$ cordova plugin add https://github.com/knowledgecode/WebSocket-for-Android.git
4044
```
4145

4246
#### Caveats
43-
Previous plugin id `com.knowledgecode.cordova.websocket` is deprecated. It will be installed old version of this if use it.
47+
Cordova core plugins have been moved to npm from Cordova plugins registry (CPR). This plugin has been moved as well. It will be **no longer updated** in CPR, but can still install it from there for now:
48+
```sh
49+
$ cordova plugin add com.knowledgecode.cordova.websocket
50+
```
4451

4552
#### Setting a Content-Security-Policy (CSP)
4653
`cordova-android@4.0.0` supports SCP. In order to permit WebSocket access using `cordova-plugin-whitelist`, append `connect-src` directive in `index.html`:
@@ -54,17 +61,16 @@ For example:
5461
```
5562

5663
## Upgrading from previous versions
57-
Just remove and re-install:
64+
Check the plugin id:
5865
```sh
59-
$ cordova plugin remove cordova-plugin-websocket
60-
$ cordova plugin add cordova-plugin-websocket
66+
$ cordova plugin
6167
```
62-
If using v0.8.x or earlier, the plugin id is different:
68+
Remove and reinstall:
6369
```sh
64-
$ cordova plugin remove com.knowledgecode.cordova.websocket
70+
$ cordova plugin rm <PLUGIN ID>
6571
$ cordova plugin add cordova-plugin-websocket
6672
```
67-
Also will need to install `cordova-plugin-whitelist` or `cordova-plugin-legacy-whitelist`.
73+
Also will need to install `cordova-plugin-whitelist` or `cordova-plugin-legacy-whitelist` if using `cordova-android@4.0.0`.
6874

6975
#### Caveats
7076
When install this plugin, it adds `INTERNET` permission to `platforms/android/AndroidManifest.xml`. If remove this plugin, the permission is also removed at the same time even if it is required for other plugins.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "cordova-plugin-websocket",
3-
"version": "0.9.0",
3+
"version": "0.9.1",
44
"description": "Cordova WebSocket Plugin for Android",
55
"cordova": {
6-
"id": "com.knowledgecode.cordova.websocket",
6+
"id": "cordova-plugin-websocket",
77
"platforms": [
88
"android"
99
]

plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
44
xmlns:android="http://schemas.android.com/apk/res/android"
55
id="cordova-plugin-websocket"
6-
version="0.9.0">
6+
version="0.9.1">
77
<name>WebSocket for Android</name>
88
<description>Cordova WebSocket Plugin for Android</description>
99
<license>Apache 2.0</license>

src/android/com/knowledgecode/cordova/websocket/WebSocket.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* This plugin is using Jetty under the terms of the Apache License v2.0.
3636
*
3737
* @author KNOWLEDGECODE <knowledgecode@gmail.com>
38-
* @version 0.9.0
38+
* @version 0.9.1
3939
*/
4040
public class WebSocket extends CordovaPlugin {
4141

www/websocket.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
/**
2222
* Cordova WebSocket Plugin for Android
2323
* @author KNOWLEDGECODE <knowledgecode@gmail.com>
24-
* @version 0.9.0
24+
* @version 0.9.1
2525
*/
2626
(function (window) {
2727
'use strict';

0 commit comments

Comments
 (0)