离线缓存与Parse.com?离线、缓存、com、Parse

2023-09-06 14:33:19 作者:>伤感大全

我试图让基于parse.com可脱机使用我的应用程序,官方教程可以在这里找到:blog.parse.com/2014/04/30/take-your-app-offline-with-parse-本地数据存储/

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/

在我的应用程序,我提供了一个按钮连接到互联网,让我想保持和固定这些一切的一切ParseObjects的列表。我的应用就是从本地数据存储填充列表视图。

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.

当我试图在我的飞行模式的应用程序,我希望它可以从已固定previous对象加载。但它冻结相反,提示我,因为它没有响应退出应用程序。 LogCat中说:com.parse.parseexception I / O故障这显然是一个互联网连接问题。

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.

推荐答案

按照解析API 。 saveEventually()将是您要使用,也可以使用内部存储来保存解析object.It提到具体的这里

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.