Reputation: 764
I have been testing firebase sample called friendlychat and making my own app using this sample. The problem is that after I kill the app and go back to it again it fetches the data from db for a long time..Sometimes even up to 5-7 seconds.
Can anyone tell me what could be the issue? My db is almost empty. 4 records having 1 word each so thats not the issue in big data.
Is there a good way to store the fetched data on the phone's cahe or somewhere and just update the data which changed in database?
Upvotes: 0
Views: 2175
Reputation: 11
it happened with me because my layout was not loading fast it was not due to the firebase it was because i was saving image in cache and the code was waiting that image is first save in cache then allowing layout to be responsive or load it has to do with threading you have to check if some line of code running on main threat if id does your layout will load after 5-7 seconds or in other cases un-responsive or app crash
Upvotes: 0
Reputation: 764
Sorted it out by Enabling Offline Capabilities on Android. It keeps data on the phone.
Upvotes: 1