保持 Android 客户端与服务器同步
我们有一个 Android 应用程序,允许用户从 GAE 后端下载数据,并将数据更改/用户输入发送回 GAE。来自服务器的所有数据也会复制到 Android 客户端上的本地数据库。我们试图找出的是当与 GAE 的连接不可用时跟踪和发送用户所做的更改的最佳实践。我们的计划是让客户端对本地数据库进行更新,如果服务器无法将这些更改发送给它,那么它们在客户端上被标记为“过时”。当服务器连接再次可用时,更改将被异步发送。 任何人都可以看到这种方法的任何问题或知道更好的方法吗?
We have an android app which allows a user to download data from a GAE back end and also send data changes/user input back to the GAE. All data from the server is also copied to the local DB on the android client. What we are trying to figure out is the best practice for tracking and sending changes the user makes when a connection to the GAE is not available. Our plan is to have the client make the updates to the local DB and if the server is unavailable to send these changes over to it then they are marked as Out of Date on the client. When the server connection becomes available again the changes will then be sent over asynchronously.
Can anyone see any problems with this approach or know of a better way to do it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请查看 http://www .google.com/events/io/2010/sessions/developing-RESTful-android-apps.html 了解同步远程数据的最佳实践。
Please, take a look at http://www.google.com/events/io/2010/sessions/developing-RESTful-android-apps.html for best practices of syncing remote data.