Upgrade to Pro — share decks privately, control downloads, hide ads and more …

How To Consume Api On Android Using Retrofit - ...

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

More Decks by AndroidDev Surabaya

Other Decks in Programming

Transcript

  1. Retrofit • Library REST client untuk Android yang mengubah API

    endpoint menjadi sebuah Java interface API service
  2. Let’s Start Yang perlu disiapkan : - Niat - Laptop

    sudah terinstall Android Studio dan sudah terkoneksi dengan Internet
  3. 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'