I have parsed JSON successfully but now i want to Cache it for offline usage, even internet is not available, and if any new entry comes i want to cache that as well.
<
And what would be the best option to cache data ? SharedPreferences or SQLite database
Which is purely based on the data you received.
But for store the full data better you can use file concept. Store the string data in your code String data = EntityUtils.toString(entity); the data you have to save to the file.If any changes in the data from the server add that to file.And retrieve the data if internet not present. Get the example code for file operations from the above link.