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
39
MVVM Architecture with Room
androiddevsurabaya
0
65
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
コードを読んで理解するko build
bells17
1
110
苦しいTiDBへの移行を乗り越えて快適な運用を目指す
leveragestech
0
1.1k
Rails 1.0 のコードで学ぶ find_by* と method_missing の仕組み / Learn how find_by_* and method_missing work in Rails 1.0 code
maimux2x
1
250
The Clean ArchitectureがWebフロントエンドでしっくりこないのは何故か / Why The Clean Architecture does not fit with Web Frontend
twada
PRO
2
390
Unity Android XR入門
sakutama_11
0
180
React 19アップデートのために必要なこと
uhyo
8
1.5k
CloudNativePGを布教したい
nnaka2992
0
120
Better Code Design in PHP
afilina
0
180
Introduction to kotlinx.rpc
arawn
0
770
はじめての Go * WASM *OCR
sgash708
1
110
責務と認知負荷を整える! 抽象レベルを意識した関心の分離
yahiru
8
1.5k
生成AIで加速するテスト実装 - ロリポップ for Gamersの事例と 生成AIエディタの活用
kinosuke01
0
130
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1369
200k
Being A Developer After 40
akosma
89
590k
Optimising Largest Contentful Paint
csswizardry
34
3.1k
Raft: Consensus for Rubyists
vanstee
137
6.8k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
How to Think Like a Performance Engineer
csswizardry
22
1.4k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
193
16k
Embracing the Ebb and Flow
colly
84
4.6k
Writing Fast Ruby
sferik
628
61k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
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'