koush/android-websockets is an open-source project on GitHub with 971 stars, written primarily in Java. WebSockets (hybi13/RFC) and socket.io client for Android
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
SocketIOClient.connect("http://localhost:80", new ConnectCallback() {
@Override
public void onConnectCompleted(Exception ex, SocketIOClient client) {
if (ex != null) {
return;
}
//Save the returned SocketIOClient instance into a variable so you can disconnect it later
client.setDisconnectCallback(MainActivity.this);
client.setErrorCallback(MainActivity.this);
client.setJSONCallback(MainActivity.this);
client.setStringCallback(MainActivity.this);
//You need to explicitly specify which events you are interested in receiving
client.addListener("news", MainActivity.this);
client.of("/chat", new ConnectCallback() {
@Override
public void onConnectCompleted(Exception ex, SocketIOClient client) {
if (ex != null) {
ex.printStackTrace();
return;
}
//This client instance will be using the same websocket as the original client,
//but will point to the indicated endpoint
client.setDisconnectCallback(MainActivity.this);
client.setErrorCallback(MainActivity.this);
client.setJSONCallback(MainActivity.this);
client.setStringCallback(MainActivity.this);
client.addListener("a message", MainActivity.this);
}
});
}
}, new Handler());
@Override
public void onEvent(String event, JSONArray argument, Acknowledge acknowledge) {
try {
Log.d("MainActivity", "Event:" + event + "Arguments:"
+ argument.toString(2));
} catch (JSONException e) {
e.printStackTrace();
}
}
@Override
public void onString(String string, Acknowledge acknowledge) {
Log.d("MainActivity", string);
}
@Override
public void onJSON(JSONObject json, Acknowledge acknowledge) {
try {
Log.d("MainActivity", "json:" + json.toString(2));
} catch (JSONException e) {
e.printStackTrace();
}
}
@Override
public void onError(String error) {
Log.d("MainActivity", error);
}
@Override
public void onDisconnect(Exception e) {
Log.d(mComponentTag, "Disconnected:" + e.getMessage());
}
TODO
Run autobahn tests
Investigate using naga instead of threads.
License
(The MIT License)
Copyright (c) 2009-2012 James Coglan
Copyright (c) 2012 Eric Butler
Copyright (c) 2012 Koushik Dutta
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the 'Software'), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Does koush/android-websockets have a project website?
No homepage URL was recorded for koush/android-websockets in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
Does koush/android-websockets have any tags?
TopGit's last sync did not record any GitHub topics for koush/android-websockets. GitHub topics appear in the right sidebar of a repository page; that's the authoritative place to check.
How active is development on koush/android-websockets?
The most recent commit recorded on koush/android-websockets was 11.2 years ago, based on the GitHub push timestamp. The repository has 260 forks — one of the better signals of community interest.
Is koush/android-websockets open source?
TopGit's metadata for koush/android-websockets does not record a license. Most public repositories on GitHub ARE open source, but the exact terms vary — verify by opening the LICENSE file directly.
Where do I read more about koush/android-websockets?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/koush/android-websockets is the definitive source.
Read full README in the tab above.
Curious whether android-websockets is right for you?
Let ChatGPT, Claude, or Perplexity look into it — click below and see what AI actually says about android-websockets.