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
AndroidでモダンREST通信してみたった
Search
kobayashi_kento
November 23, 2015
Technology
0
250
AndroidでモダンREST通信してみたった
kobayashi_kento
November 23, 2015
Tweet
Share
More Decks by kobayashi_kento
See All by kobayashi_kento
Kotlinの好きなところ
kobaken0029
0
540
Compose駆動開発のためのマルチモジュール化
kobaken0029
0
190
DataStoreを導入してみた
kobaken0029
1
280
Epoxyを用いたレイアウト構築術
kobaken0029
1
210
Androidエンジニアが1週間でiOSアプリ開発を学び、1ヶ月で大規模アプリ開発にJOINした話
kobaken0029
0
3k
Modern REST Communicate for Android
kobaken0029
0
1.5k
Other Decks in Technology
See All in Technology
When Windows Meets Kubernetes…
pichuang
0
300
2025年のARグラスの潮流
kotauchisunsun
0
790
20250116_自部署内でAmazon Nova体験会をやってみた話
riz3f7
1
100
embedパッケージを深掘りする / Deep Dive into embed Package in Go
task4233
1
210
カップ麺の待ち時間(3分)でわかるPartyRockアップデート
ryutakondo
0
140
あなたの知らないクラフトビールの世界
miura55
0
120
Accessibility Inspectorを活用した アプリのアクセシビリティ向上方法
hinakko
0
180
Unsafe.BitCast のすゝめ。
nenonaninu
0
200
The future we create with our own MVV
matsukurou
0
2k
Formal Development of Operating Systems in Rust
riru
1
420
.NET AspireでAzure Functionsやクラウドリソースを統合する
tsubakimoto_s
0
190
Evolving Architecture
rainerhahnekamp
3
250
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Designing Experiences People Love
moore
139
23k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.4k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
3
240
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
Optimising Largest Contentful Paint
csswizardry
33
3k
Building Your Own Lightsaber
phodgson
104
6.2k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.3k
Become a Pro
speakerdeck
PRO
26
5.1k
Automating Front-end Workflow
addyosmani
1366
200k
VelocityConf: Rendering Performance Case Studies
addyosmani
327
24k
Transcript
AndroidͰϞμϯͳREST௨৴ͯ͠Έͨͬͨ
Android
ࣗশAndroidMaster(স)͕
REST௨৴ΛΧϯλϯʹѻ͑Δ ࣮ͨͬͨ͠(ɾω<) ũųųƅƁ
ʊਓਓਓਓʊ ʼ REST ʻ ʉY^Y^Y^Yʉ
ιϑτΣΞΞʔΩςΫνϟ ͷ ελΠϧͷҰͭ
ҰߦͰݴ͏ͱ
Ϧιʔεॏࢹઃܭ
RESTful
Not RESTful
ίϨͰΘ͔Βͳ͍ਓ ϫγϫγMAXͰʙʂʂ ͦΜͳͷ͋Μ·Γʹ͜ʙʂʂ
ຊ
͜Ε͔ΒαϯϓϧΞϓϦΛ ࡞͍͖ͯ͠·͢
༏लͳϨϏϡϫʔͷྗΛ आΓͳ͕Β࣮͍͖ͯ͠·͢Αʂ
༻ϥΠϒϥϦͷհ
༻ϥΠϒϥϦ • OkHttp • Retrofit • RxAndroid • Butter Knife
• Lombok
Ͱૣ
gradleʹهड़ͯ͘͠Ͱ
build.gradle(appԼ)
None
༻APIհ
༻API • WeatherHacks
WebAPIͷInterface ࡞ΔͰ
WeatherHacksApi.java
ResponseObject(Entity) ࡞ΔͰ
ResponseObject.java
͜ΕͰ४උ͓̺
None
ͦΕ͡Όɺຊ൪ߦ͘Ͱ
͜Ε͔ΒΔ͜ͱ
ࡾߦͰ
Activity(Fragment)ʹ RestAdapterΛ࡞ͯ͠ subscribeʂ
MainActivity.java
MainActivity.java
MainActivity.java
͜Ε͚ͩʂ
ͱ
ࢥΘͤͯ
None
AndroidManifest.xmlʹ Internet௨৴ͷͨΊͷ Permissionهड़͕ඞཁͳΜʂ
AndroidManifest.xml
None
ΈΜͳϦΞΫςΟϒʹ REST௨৴͠Αͬˑ
None
https://github.com/kobaken0029/RestSample