Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
WebSocket for Android ver.2
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Yuichi Maekawa
September 16, 2016
Programming
580
1
Share
WebSocket for Android ver.2
Yuichi Maekawa
September 16, 2016
More Decks by Yuichi Maekawa
See All by Yuichi Maekawa
Claude Code + Container Use と Cursor で作る ローカル並列開発環境のススメ / ccc local dev
kaelaela
16
9.6k
やらないことを決める
kaelaela
1
1.3k
ハイインテグリティコミットメントを実現するスクラム開発の進化 / Evolution of Scrum for High Integrity Commitment
kaelaela
1
930
アルプのロードマップ変遷 / Alp Roadmap History
kaelaela
0
3k
ApexでPofEAA / PofEAA by Apex
kaelaela
2
520
Zap Your DX!
kaelaela
1
610
Clasp使ってGASを快適に開発する / Let's play Clasp
kaelaela
0
680
LWCでローカルコンポーネント開発 / Local development on LWC
kaelaela
1
1.3k
Clean ArchitectureとEffで変更に強いAPIを設計する
kaelaela
8
4.2k
Other Decks in Programming
See All in Programming
2026-04-15 Spring IO - I Can See Clearly Now
jonatan_ivanov
1
210
書き換えて学ぶTemporal #fukts
pirosikick
2
370
20年以上続くプロダクトでも使い続けられる静的解析ツールを求めて
matsuo_atsushi
0
150
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
660
サーバーレスで作る、動画データ管理基盤
oyasumipants
0
130
(Re)make Regexp in Ruby: Democratizing internals for the JIT
makenowjust
3
1.1k
〜バイブコーディングを超えて〜 チームで実験し続けたAI駆動開発
tigertora7571
0
210
実用!Hono RPC2026
yodaka
2
310
PHPer、Cloudflare に引っ越す
suguruooki
2
200
Cache-moi si tu peux : patterns et pièges du cache en production - Devoxx France 2026 - Conférence
slecache
0
350
AIを導入する前にやるべきこと
negima
2
360
cloudnative conference 2026 flyle
azihsoyn
0
180
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
500
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
150
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
790
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Are puppies a ranking factor?
jonoalderson
1
3.4k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
250
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
380
Being A Developer After 40
akosma
91
590k
Rails Girls Zürich Keynote
gr2m
96
14k
Bash Introduction
62gerente
615
210k
ラッコキーワード サービス紹介資料
rakko
1
3.3M
Transcript
WebSocket For Android ver.2 @kaelaela(Yuichi Maekawa) 鳥: kaelaela31 蛸猫: kaelaela
ver.1 https://speakerdeck.com/kaelaela/websocket-for-android on Aug 23, 2016 @ Wantedly
The next day
> BROADCAST DESTROY < #REF! -> Broadcast Destroy: http://konifar-zatsu.hatenadiary.jp/entry/2016/07/27/020130
But
This entry’s target is enterprise services.
Sounds logical. I agree to you only if enterprise services.
For normal mobile app • Almost all services have no
proxy • Need real time update!(messaging app or game) • Need low energy consumption! > If you make long polling system, the user say “Battery fire!” and put 1 star...
Use WebSocket in peace ;-)
Do you know okhttp-ws?
Sample code • My sample Android project https://github.com/kaelaela/WebSockcetSample
okhttp-ws
Update of okhttp-ws • Add to main repos on v3.5.0!!(SNAPSHOT
now) PR: #2852 https://github.com/square/okhttp/pull/2852 compile 'com.squareup.okhttp3:okhttp-ws:3.4.1' compile 'com.squareup.okhttp3:okhttp:3.5.0'
Update of okhttp-ws • Remove ws package • Add method
to OkHttpClient okhttp3.ws.* -> okhttp3.* newWebSocketCall
Sample code diff • 3.4.1 -> 3.5.0 https://github.com/kaelaela/WebSockcetSample/commit/45b88ad2ecc5a89dbd493 fc3cc25152511e28529
Echo test: websocket.org
Echo test: websocket.org Supports TLS.
Retrofit? -> No change. It will be added in v2.2!!!
(No due date. 31% complete at 2016-09-16.) • Issue #924 • Commit interface Service { @GET("/chat/{id}") Call<WebSocket> chat(@Path("id") String id); }
Let’s replace your http client with okhttp! If your project
use okhttp.
Thx ;-)