Offline caching with Parse.com?

余生长醉 提交于 2020-01-25 05:37:28

问题


I was trying to make my app based on parse.com available offline, the official tutorial can be found here: blog.parse.com/2014/04/30/take-your-app-offline-with-parse-local-datastore/

In my app, I provide a button to connect to internet, get the list of all ParseObjects I want to keep and pin them all. My app is just a listview that populates from local datastore.

When I tried my app with airplane mode on, I was hoping that it could load from previous objects that have been pinned. But it freezes instead, prompts me to exit the app because it isn't responding. LogCat says "com.parse.parseexception i/o failure" which obviously is an internet connection problem.

I just want to save the cache so users won't have to refresh new data every time the app is opened.


回答1:


According to the parse api.saveEventually() would be the function that you want to use or you can use internal storage to save the parse object.It is mentioned detailed here.



来源:https://stackoverflow.com/questions/26327477/offline-caching-with-parse-com

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!