Reputation: 979
From My android Application want to Capture a Image ,With a Text Field.
Text fields Data need to Save In Local Sqlite Database(Like TodoItem Table) ,Image will Save in Sdcard With Offline.
When Internet Comes Image Need to Sync in Azure Blob Storage, Text data need to Sync in Azure Todoitem Server Table.
I tried Below Links, for Offline Data Sync is Working. But Offline Image Upload to Azure not able to find Any code or Link.
Please help me to Find the solution
Link I tried for Image Upload to Azure Online Mode
Upvotes: 1
Views: 2251
Reputation: 91
The Azure Mobile Apps SDK always contained support for online/offline sync of data, but was recently updated to include support for files. To see how to add offline file sync to your iOS, Android, and Windows 10 apps, check out the linked post.
Upvotes: 1
Reputation: 8035
This is not possible in todays Android SDK. As a result, you will end up rolling your own offline sync for images. Sync logic for static stuff tends to be easy - you read the file list from the SD, generate an API for the server that reads the list from blob or (more appropriately) Azure File Storage and compare the two. Since your list is static, you can download files that are not on the SD card and upload files that are not on the server.
There are two issues you need to deal with if your files are not static. First is updates - generally, files tend to deal with "latest file wins" so you can check and compare the last write timestamp. The second is "deleted files". If you do "deleted files", you will need to create a sync table for the file list (and the Azure Mobile Apps SDK will help you there) - then check your SD card after the sync for files that are on the SD card but not in the table - those should be removed.
Upvotes: 1