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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Yuichi Maekawa
September 16, 2016
Programming
580
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
950
アルプのロードマップ変遷 / 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
690
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
スマートグラスで並列バイブコーディング
hyshu
0
120
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
150
[2026年度第1回ORセミナー] 計画最適化ベンチャーと競技プログラミング人材
terryu16
0
260
Spec Driven Development | AI Summit Lisbon
danielsogl
PRO
0
180
ふつうのFeature Flag実践入門
irof
7
3.7k
ユニットテストの先へ:テスト技法で要求・仕様を整理するJava開発実践 / Beyond_Unit_Testing_Practical_Java_Development_Techniques_for_Organizing_Requirements_and_Specifications
shimashima35
0
390
依存関係から依存物へ―Dependencyという言葉の歴史をひも解く
j_lee
0
110
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
3.6k
RTSPクライアントを自作してみた話
simotin13
0
570
Swiftのレキシカルスコープ管理
kntkymt
0
220
The Arts and Crafts of Work in the AI Era — Toward Mastery in Software Development
kuranuki
1
750
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.2k
Featured
See All Featured
Building Applications with DynamoDB
mza
96
7.1k
New Earth Scene 8
popppiees
3
2.3k
Heart Work Chapter 1 - Part 1
lfama
PRO
7
36k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
200
Building an army of robots
kneath
306
46k
Making the Leap to Tech Lead
cromwellryan
135
9.9k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
23k
The Curious Case for Waylosing
cassininazir
1
380
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.6k
The Cost Of JavaScript in 2023
addyosmani
55
10k
For a Future-Friendly Web
brad_frost
183
10k
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 ;-)