You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-11Lines changed: 17 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ This is based on [Jetty 8](https://github.com/eclipse/jetty.project/tree/jetty-8
5
5
## Requirements
6
6
- Android 2.3 or later (recommended 4.1 or later)
7
7
-`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
9
9
10
10
The plugin for Cordova 2.x can be found [here](https://github.com/knowledgecode/WebSocket-for-Android/tree/2.x).
11
11
@@ -27,20 +27,27 @@ The plugin for Cordova 2.x can be found [here](https://github.com/knowledgecode/
27
27
- Android 3.x (Honeycomb) are not supported (maybe work, but not tested).
28
28
- 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.
29
29
- 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.
31
31
32
32
## Installation
33
-
Use Cordova Command-Line Interface (CLI):
33
+
Use Cordova Command-Line Interface (CLI). At first, check Cordova version:
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:
`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:
54
61
```
55
62
56
63
## Upgrading from previous versions
57
-
Just remove and re-install:
64
+
Check the plugin id:
58
65
```sh
59
-
$ cordova plugin remove cordova-plugin-websocket
60
-
$ cordova plugin add cordova-plugin-websocket
66
+
$ cordova plugin
61
67
```
62
-
If using v0.8.x or earlier, the plugin id is different:
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`.
68
74
69
75
#### Caveats
70
76
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.
0 commit comments