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
480
Compose駆動開発のためのマルチモジュール化
kobaken0029
0
180
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
組織に自動テストを書く文化を根付かせる戦略(2024冬版) / Building Automated Test Culture 2024 Winter Edition
twada
PRO
13
3.7k
UI State設計とテスト方針
rmakiyama
2
560
Snykで始めるセキュリティ担当者とSREと開発者が楽になる脆弱性対応 / Getting started with Snyk Vulnerability Response
yamaguchitk333
2
180
あの日俺達が夢見たサーバレスアーキテクチャ/the-serverless-architecture-we-dreamed-of
tomoki10
0
450
スタートアップで取り組んでいるAzureとMicrosoft 365のセキュリティ対策/How to Improve Azure and Microsoft 365 Security at Startup
yuj1osm
0
210
.NET 9 のパフォーマンス改善
nenonaninu
0
880
PHP ユーザのための OpenTelemetry 入門 / phpcon2024-opentelemetry
shin1x1
1
200
終了の危機にあった15年続くWebサービスを全力で存続させる - phpcon2024
yositosi
4
5.3k
Microsoft Azure全冠になってみた ~アレを使い倒した者が試験を制す!?~/Obtained all Microsoft Azure certifications Those who use "that" to the full will win the exam! ?
yuj1osm
2
110
10分で学ぶKubernetesコンテナセキュリティ/10min-k8s-container-sec
mochizuki875
3
330
Postman と API セキュリティ / Postman and API Security
yokawasa
0
200
マルチプロダクト開発の現場でAWS Security Hubを1年以上運用して得た教訓
muziyoshiz
2
2.3k
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1030
460k
Embracing the Ebb and Flow
colly
84
4.5k
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
Six Lessons from altMBA
skipperchong
27
3.5k
Typedesign – Prime Four
hannesfritz
40
2.4k
Designing Experiences People Love
moore
138
23k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
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