Summary

First of all, in this chapter, we learned a lot of different ways to handle exceptions in RxJava. Methods including .onResumeNext(), .doOnError(), and .subscribe(), to handle errors and exceptions were covered. We also explored a few different methods to show errors in the Android UI.

Most importantly, we learned how an exception can be handled in a centralized fashion so that it is easy to change error-handling mechanisms in the future.

In this chapter, we also learned how to retrieve data from the SQLite database using StorIO. In order to do that, we covered GetResolvers and how to construct Query objects for StorIO. We also saw how to handle data conversion from the types that the SQLite database supports and the types that are used in the application's domain model.

Furthermore, the StorIO querying capabilities were integrated into the current flow of StockUpdate items retrieval; so, now we will be able to show something even if there is no Internet connection.

Finally, we completed the configuration of StorIO for StockUpdate objects by implementing DeleteResolver so that all four operations are supported: Creating, Retrieving, Updating, and Deleting data (CRUD).

Also, by now, little by little, it should start to become visible that the flow we have been working on is becoming too complex and too difficult to maintain. We will see how to cope with this in later chapters.

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

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