# Native Android Websockets with Autobahn

**URL:** <https://forum.mattermost.com/t/native-android-websockets-with-autobahn/2170>\
**Category:** Troubleshooting\
**Created:** [August 31, 2016, 2:53pm UTC](https://forum.mattermost.com/t/native-android-websockets-with-autobahn/2170 "2016-08-31T14:53:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Julia](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/julia/32/864_2.png) [@Julia](https://forum.mattermost.com/u/Julia)\
**Post date:** [August 31, 2016, 2:53pm UTC](https://forum.mattermost.com/t/native-android-websockets-with-autobahn/2170/1 "2016-08-31T14:53:02Z")

</div>

Does anyone have suggestions for how to consume websockets on android from the mattermost server?

I have tried using the method from [this tutorial](https://www.varvet.com/blog/using-websockets-in-native-ios-and-android-apps/) but I am getting errors detailed [here](http://stackoverflow.com/questions/39234517/java-websocket-draft-refuses-handshake/39239781#39239781). I have also considered using autobahn android but they have a warning that says

```
Autobahn|Android implements version 1 of WAMP.
This is incompatible with version 2 of WAMP which is already implemented in Autobahn|Python as well as Autobahn|JS
Migration of Autobahn|Android to WAMP v2 is coming, but we cannot guarantee a release date.

```

and I don’t know how well that would play with the mattermost server.

---

<div class="post-metadata">

**Author:** ![se\_bastiaan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/se_bastiaan/32/921_2.png) [@se\_bastiaan](https://forum.mattermost.com/u/se_bastiaan)\
**Post date:** [September 11, 2016, 10:46pm UTC](https://forum.mattermost.com/t/native-android-websockets-with-autobahn/2170/2 "2016-09-11T22:46:25Z")

</div>

Use [https://github.com/square/okhttp/tree/master/okhttp-ws](https://github.com/square/okhttp/tree/master/okhttp-ws)

---

<div class="post-metadata">

**Author:** ![lindy65](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/lindy65/32/1811_2.png) [@lindy65](https://forum.mattermost.com/u/lindy65)\
**Post date:** [September 15, 2016, 7:12am UTC](https://forum.mattermost.com/t/native-android-websockets-with-autobahn/2170/3 "2016-09-15T07:12:27Z")

</div>

Hi @Julia

Can you confirm that se\_bastiaan’s suggestion worked for you and fixed the issue?

Thanks for your help @se_bastiaan!

---

<div class="post-metadata">

**Author:** ![se\_bastiaan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/se_bastiaan/32/921_2.png) [@se\_bastiaan](https://forum.mattermost.com/u/se_bastiaan)\
**Post date:** [September 15, 2016, 9:29am UTC](https://forum.mattermost.com/t/native-android-websockets-with-autobahn/2170/4 "2016-09-15T09:29:54Z")

</div>

I noticed that you opened [multiple[1]](http://forum.mattermost.com/t/solved-failed-to-upgrade-websocket-connection/2133) [questions[2]](http://forum.mattermost.com/t/automatically-updates-upon-new-message/2124) that follow-up to this post in the past month. Maybe it’s an idea to open source your code (since you seem to working on a native client) in a Github repository with your work? Maybe I can find some time to help. Or maybe there are others that want to help creating a native client.
