akvo / akvo-flow-mobile

Akvo Flow app
GNU General Public License v3.0
18 stars 16 forks source link

Download datapoints automatically with forms #1594

Closed valllllll2000 closed 3 years ago

valllllll2000 commented 4 years ago

Background

Another thing about forms: they are downloaded in a separate service from the datapoints, if we wanted to show both form number and datapoints we would need to make changes in the logic. For now here how it works: User opens the app -> forms are downloaded without further interaction from the user User presses download inside a selected survey -> we download the datapoints

It is awkward that the Alphonso has to download datapoints manually; it requires that he knows that some datapoints are due to be downloaded; in which case they have to manually do what ideally should be done automatically by the app (it is akin to having to manually 'download' messages in an email app, instead of the app doing so automatically).

I understand this is the logic that we've of course, but with the direction that we are taking, an assignment (forms + datapoints) should be bundled together when it comes to downloading.. Even more so because we are moving away from those 'huge datapoints list download' which were inefficient and took too long (which made a case for separating forms and datapoints) to dealing with a subset of datapoints per device..

Originally posted by @Kiarii in https://github.com/akvo/akvo-flow-mobile/issues/1592#issuecomment-594360396

TODO

Download datapoints with forms Make sure images are downloaded only once (check if file exists) Make sure to handle networking errors Notify users of how many datapoints were downloaded

Issue

Backend service returns datapoints per survey, so this will require multiple api calls Would it be possible to have backend return 2 lists: forms + datapoints?

muloem commented 4 years ago

I suggest we put this one in the backseat for the time being until we see wider adoption of the datapoints assignments and how that progresses. Reason being for now we have opted for a setup where once a device is added to an assignment, we automatically assign all datapoints. This is part of the transition to get users to start using the datapoints assignment without too much confusion at the beginning.

Once we see that scaling up, we can remove the opt out and also introduce the automated download of datapoints once an assignment is made.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.