Web Service Images Java ZIP Android

Asked

Viewed 95 times

0

I need my Android app to download a large shipment of images and store on the Smartphone disk, but I need to decide what would be the best format to download these files, because the images should be available in offline mode of the application.

1-Web Service return a compressed file (zip) with all the images and the application perform the decompression in the desired directory.

2-???

  • What’s the difference of this and sending the images together with your APK? Is there a time when they would be updated?

  • Yes images can be updated and/or incremented, I did not inform in the post but would be a product catalog.

1 answer

1


2 - Download only what is necessary when accessing the requested item and keep it in local cache. If there is internet you order the updated item, otherwise access the local item.

Perf Theory: Caching - https://youtu.be/JkwrNmCwFfA

3 - Send the first shipment together with your APK and use a SyncAdapter to sync data between the device and the web service regularly when internet is available.

Handling Offline Capability and Data Sync in an Android

  • Excellent, but I’m going to need a complete shipment with all the files first, as the representative will come out with a product catalog and will need the previously loaded images, because it may not have internet connection to perform the download in time of use. But the idea of caching is very good, could download all in a shipment via synchronization and update and other operations could be done via cache.

  • There goes a third option...

  • I liked it, I will adapt what I thought best in all, I can not send the images with APK, because each company will have its catalog of products, and the registration of images will be made on a website.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.