I have an Android app and I want to send a text from the Android application to the webpage using HTML5 WebSocket
.
Is this possible and if so how?
If you have a custom client then yes, this is 100% possible.
You can use WebSockets to create a persistent connection from a client (such as a mobile device or a computer) to an App Engine instance. The open connection allows two-way data exchange between the client and the server at any time, resulting in lower latency and better use of resources.
Avoid using WebSockets if only a small number of messages will be sent or if the messaging is very infrequent. Unless the client must quickly receive or act upon updates, maintaining the open connection may be an unnecessary waste of resources.
WebSocket is a protocol that makes it possible to open a two-way interactive communication session between the client and the server. It provides a full-duplex communication channels over a single TCP connection.
I'm aware of 2 libs for Android supporting WebSockets from native apps
http://code.google.com/p/weberknecht
https://github.com/tavendo/AutobahnAndroid
Autobahn supports RFC6455 (the final WS spec), integrates well with UI and service apps and support RPC and PubSub over WebSockets.
Disclaimer: I am the author of Autobahn.
A simple google search for 'android websockets' turned up this. He is referring to a GitHub project called websocket-android-phonegap.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With