Image files sync in Azure Mobile Apps for Android

狂风中的少年 提交于 2019-12-23 05:46:09

问题


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"?

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

Azure Mobile Apps - structured data sync with files


回答1:


I've also read the following instructions about image sync, but they don't seem to target 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.



来源:https://stackoverflow.com/questions/46178505/image-files-sync-in-azure-mobile-apps-for-android

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