Chapter 8. REST in Peace – RxJava and Retrofit

In the previous chapter, we learned how to operate on threads that are different than the UI thread using Schedulers. We learned how to effectively run I/O tasks without blocking the UI and how to run long, computational tasks without losing out on the app performance. In this final chapter, we are going to create a definitive real-world example, map remote APIs with Retrofit, and query them asynchronously to create a rich UI with zero effort.

The project goal

We are going to create a new Activity item in our existing example app. This Activity item will retrieve the 10 most popular users from Stack Overflow using the StackExchange API. Using this information, the app will show a list of users with the picture, name, reputation number, and city of living. For every user, the app will retrieve the current weather forecast using the city of residence and the OpenWeatherMap API, and it will show a tiny weather icon. Based on the information retrieved from Stack Overflow, the app will provide an onClick event for every user on the list, and it will open their personal website for users that have specified a personal website in their profile, or it will open the Stack Overflow user profile.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.22.23