图像文件在Android的Azure移动应用中同步 [英] Image files sync in Azure Mobile Apps for Android

查看:64
本文介绍了图像文件在Android的Azure移动应用中同步的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很抱歉,如果这个问题不包含任何代码.我正在使用Azure移动应用程序构建一个Android应用程序.我成功地通过以下示例 TodoList . 该示例描述了数据同步的情况,但是如果我想添加对图像同步的支持怎么办?我是否必须将图像文件另存为blob到数据库中?是否将文件与db中的任何其他记录一样对待,还是有更好的方法?我必须使用移动应用"以外的服务吗?

Sorry if this question does not contain any code. I am building an Android app using Azure Mobile Apps. I am successfully following the sample with the TodoList . The sample describes the case for data sync, but what if I want to add support for images sync? Do I have to save the image files as blob inside the database? Do I treat files as any other record in the db, or is there a better way? Do I have to use a service other than "Mobile Apps"?

我还阅读了以下有关图像同步的说明,但它们似乎并不针对Android:

I've also read the following instructions about image sync, but they don't seem to target Android:

Azure Mobile应用-结构化数据与文件同步

推荐答案

我还阅读了以下有关图像同步的说明,但它们似乎并不针对Android:

I've also read the following instructions about image sync, but they don't seem to target Android:

用于文件同步的程序集是预发行版本.我建议您当前自己为Android设备实现文件同步功能.要实现同步功能,建议您创建一个表来存储文件日志.表定义应该是这样的.

The assemblies used for file sync is a prerelease version. I suggest you implement the file sync feature for your Android device by yourself currently. To implement the sync feature, I suggest you create a table to store the file log. The table definition should be like this.

+-------------------+
|    Column Name    |
+-------------------+
| File name         |
| Operation type    |
| Modified date     |
+-------------------+

在设备上创建或删除文件后,我们需要向文件日志表中添加日志记录.要同步文件,我们需要比较此表上本地数据和远程数据之间的差异以同步文件.

After created or deleted the file on your device, we need to add a log record to the file log table. To sync the files, we need to compare the differences between local data and remote data on this table to sync the files.

这篇关于图像文件在Android的Azure移动应用中同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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