I have made an app that shows data in the app which has been fetched from firebase and when in offline mode means in the absence of internet connection, it does not show any data and keeps waiting for the connection to be available.
Asked
Active
Viewed 604 times
1 Answers
0
You can save the response from server in local database, so whenever user opened your app without internet connection you can show data from local database.

Mahdi Nouri
- 1,391
- 14
- 29
-
Thanks a lot! but can we do this with SharedPreferences ? – HamzaAhmed Sep 10 '17 at 14:55
-
Yes you can achieve this with SharedPreferences too but it's not easy and i don't recommend you to do it with SharedPreferences. – Mahdi Nouri Sep 10 '17 at 17:59