Implementing the caching logic to POIApp

The DBManager class is now tested and ready to use straightaway on POIApp. The POIApp will save the POI records when the download is completed, and the list will be retrieved later when the app is unable to fetch the updated list from the server. Perform the following steps to integrate the DBManager class with POIApp:

  1. Call the CreateTable() method on the POIListActivity class to initiate the database:
    DBManager.Instance.CreateTable();
  2. Open the POIListFragment class and go to the DownloadPoisListAsync() method. We have used this method to download the POI list from the server. The following updates are required here:
    1. Clear the database cache when the POI downloads from the server are successful.
    2. Save the newly ...

Get Xamarin Mobile Application Development for Android - Second Edition 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.