离线缓存与Parse.com? [英] Offline caching with Parse.com?

查看:147
本文介绍了离线缓存与Parse.com?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让基于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.

这篇关于离线缓存与Parse.com?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆