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
How To Consume Api On Android Using Retrofit - ...
Search
AndroidDev Surabaya
May 18, 2018
Programming
1
59
How To Consume Api On Android Using Retrofit - Meetup AndroidDev Surabaya #8
Menjelaskan bagaimana cara menggunakan Retrofit dalam mengelola REST API.
AndroidDev Surabaya
May 18, 2018
Tweet
Share
More Decks by AndroidDev Surabaya
See All by AndroidDev Surabaya
Meetup Desember : AndroidDev Surabaya Overview
androiddevsurabaya
0
38
MVVM Architecture with Room
androiddevsurabaya
0
64
Android : Easy Phone Authentication using Firebase
androiddevsurabaya
0
62
Mengatur Tampilan dan Tata Letak di Android
androiddevsurabaya
0
94
Build More with KOTLIN Anko | AndroidDevSBY Meetup 11
androiddevsurabaya
0
110
The Magic of Kotlin
androiddevsurabaya
0
160
BE AN ANDROID EXPERT - AndroidDev Surabaya Meetup #9
androiddevsurabaya
0
130
#KartiniZamanNow - Meetup AndroidDev SBY #7
androiddevsurabaya
0
78
Learn Android UI #4 - Meetup AndroidDev Surabaya #7
androiddevsurabaya
0
110
Other Decks in Programming
See All in Programming
社内フレームワークとその依存性解決 / in-house framework and its dependency management
vvakame
1
560
CDK開発におけるコーディング規約の運用
yamanashi_ren01
2
130
楽しく向き合う例外対応
okutsu
0
130
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
170
2024年のkintone API振り返りと2025年 / kintone API look back in 2024
tasshi
0
220
コミュニティ駆動 AWS CDK ライブラリ「Open Constructs Library」 / community-cdk-library
gotok365
2
140
How mixi2 Uses TiDB for SNS Scalability and Performance
kanmo
37
14k
ソフトウェアエンジニアの成長
masuda220
PRO
11
1.4k
なぜイベント駆動が必要なのか - CQRS/ESで解く複雑系システムの課題 -
j5ik2o
11
3.8k
仕様変更に耐えるための"今の"DRY原則を考える / Rethinking the "Don't repeat yourself" for resilience to specification changes
mkmk884
0
260
2024年のWebフロントエンドのふりかえりと2025年
sakito
3
250
もう僕は OpenAPI を書きたくない
sgash708
5
1.8k
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Code Review Best Practice
trishagee
67
18k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.2k
A Tale of Four Properties
chriscoyier
158
23k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Java REST API Framework Comparison - PWX 2021
mraible
28
8.4k
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
GitHub's CSS Performance
jonrohan
1030
460k
The World Runs on Bad Software
bkeepers
PRO
67
11k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
Optimizing for Happiness
mojombo
376
70k
Transcript
How To Consume Api On Android Using Retrofit By: Akhmad
Naufal Refandi
Akhmad Naufal Refandi Android Developer Email :
[email protected]
Retrofit • Library REST client untuk Android yang mengubah API
endpoint menjadi sebuah Java interface API service
Method - POST - GET - DELETE - PUT
Method GET @Path : https://api.themoviedb.org/3/movie/{movie_id}? api_key=<<api_key>>&language=en-US @Query : https://api.themoviedb.org/3/movie/{movie_id}? api_key=<<api_key>>&language=en-US
POST • @Field • @Body
Let’s Start Yang perlu disiapkan : - Niat - Laptop
sudah terinstall Android Studio dan sudah terkoneksi dengan Internet
Library yang dibutuhkan implementation 'com.android.support:appcompat-v7:27.1.1' implementation 'com.android.support:design:27.1.1' implementation 'com.android.support:cardview-v7:27.1.1' implementation
'com.android.support:support-v4:27.1.1' implementation 'com.android.support:recyclerview-v7:27.1.1' implementation 'com.android.support:cardview-v7:27.1.1' implementation 'com.android.support.constraint:constraint-layout:1.1.0’ implementation 'com.jakewharton:butterknife:8.8.1' implementation 'com.intuit.sdp:sdp-android:1.0.4’ implementation 'com.squareup.okhttp3:okhttp:3.8.1' implementation 'com.squareup.okhttp3:logging-interceptor:3.8.1' implementation 'com.squareup.retrofit2:retrofit:2.3.0' implementation 'com.squareup.retrofit2:converter-gson:2.3.0’ annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'