Hello.
I have an existing mobile application that was not initially built with offline capabilities in mind. However, now I have a request to make it work offline (more like when the signal strength is poor). In short, the app is used to take photos under a specific concept (such as a department), the users can view them, take more photos, delete photos, and later in the business flow, send them all (or the ones they select) by email to a designated recipient.
I've been investigating and reading the documentation to understand the best approach and best practices for implementing such a scenario. While doing so, I came across this presentation from the OutSystems Worldwide Developer Conference 2018. In the Q&A at the end of the session (around 56:13), there was a question about the best practice in storing a large set of images. In the answer given, the presenter recommends saving a thumbnail in the local storage and the original image in the device's file system using the File Transfer Plugin. Then, to show the photos to the users, they show the thumbnail, and if the user clicks on it, they get the original image. He also mentions that at that time, they didn't have any example of this implementation, but that there was another presentation with that example.
I have some questions:
Thanks in advance for any help and suggestions you may have.
Best regards,
André
Why you want to make it by department? Is it volume? i would do it for everything.
Regarding your approach: That is very valid.
I'd say that is a "mostly offline" take on the problem. Ideal for the worst scenario.
If it only happens once in a while, or for short time (you are doing inventory and go to the basement for 30 minutes) your perspective could be:
Just to clarify, I referred to it as a "department" purely for the sake of the example. The actual grouping of the photos is based on a different concept, which isn't relevant to go into detail about here.
I'm considering doing it by department because, when navigating to a department’s details, I want the associated photos to load as quickly as possible. I assume that triggering a sync for all departments would take longer and delay access to the relevant data.
Regarding my approach, you're right, I’m planning for the worst-case scenario. In practice, this actually happens fairly often, even if only for short periods.
I have a few questions and remarks regarding your suggestions:
Thank you for the suggestions and the discussion so far.
Yes, it would be SyncOnOnline. One photo at the time, chronologically.
I was assuming you wanted to send the photos. If you need them locally and network is poor, you should keep them.
My suggestion is so that users know the more they hoard, the longer it will take to sync. Maybe they have data off on purpose.
The challenge with SyncOnOnline is that they may never actually go offline; they simply have a very weak signal, so the event detecting the change of status from offline to online may never be triggered.
I do want to send the photos. However, I also want to keep them available on the device, at least for some time.
Ok, I got it. I need to find a way to give as much feedback as possible to the user.
Thanks again for your input.