0

I am trying to cache data after accessing it from internet.

Take an example of Facebook where when we see the data with internet connection, it will cache it somewhere. Suppose we disconnect from internet then again if we open fb app then it will loads the data whatever we had seen. After reloading it will check for internet connection.

In the same way I want to achieve this.

I have some data to access from internet with images,text in RecyclerView. I want to cache this data into device memory so that if user don't have internet connection then also the user should be displayed the data whatever they had seen before reloading.

Mohd Asif Ahmed
  • 1,080
  • 1
  • 13
  • 24
  • 1
    So basically you need to maintain your cache : ideally path to store such cache could be /data/data//files/ or /data/data//cache , store what are information you want to store here and use it offline cases. – dex Jan 18 '16 at 04:00
  • 1
    http://stackoverflow.com/questions/2676280/good-way-to-cache-data-during-android-application-lifecycle http://blog.tomgibara.com/post/126377651/global-application-state-in-android Check this two links. – Mohd Asif Ahmed Jan 18 '16 at 05:20

1 Answers1

2

you may need to cache your feed data using ormlite(sqlite) and image you can use image caching library like picasso or glide

MinFu
  • 343
  • 1
  • 13