Integrating the API

Our Android app is written in Kotlin and has a lot of learning's. We will be skipping the other code part where we have created activities, layouts, and so on. We have kept the presenter layer in between for testability purposes. The presenter will have all the business logic. We will keep our views as dumb as possible. It should not have any business logic. The view will not decide anything. It will simply initiate the presenter and let the presenter deal with all delegations. 

We need to add the following dependencies in our app-level build.gradle:

implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'implementation 'io.reactivex.rxjava2:rxjava:2.1.0'implementation 'com.squareup.retrofit2:retrofit:2.3.0'implementation ...

Get Hands-On Serverless Applications with Kotlin now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.