Closed mariobehling closed 8 years ago
Sure @mariobehling Shouldn't be difficult to add since we are also using a python script on the generator. Let me close the existing issue of separately uploading the json files or do we keep both the things :to add a zip and to add json separately ? Which sounds better?
Just zip in future.
@mananwason let's update the existing parent issue to reference to this. And close the older one which is regarding uploading json files.
Yes @the-dagger Was just doing the same
@mariobehling 👍
The zip file could also include images and audio in future. Please refer to this issue for more info: https://github.com/fossasia/open-event-orga-server/issues/1217
@mariobehling If we use stored images and audio in the app, first of all the apk size will get huge and plus we'll have to change the whole implementation and maintain two versions of the app to load the images stored as assets locally. I personally don't think that it's worth it. If you want we can make a lite version wherein the users have the options to download all assets at once and don't update them or not download any images etc. at all
Yes, good point. Let's focus on the photos and leave the audio out. We need to keep the link to the orga server for the audio then.
Regarding the images, we need to implement image processing to scale images to the size we need. This will keep them smaller. So, the flow could be like that: The import zip would have a big resolution. Then we convert and scale images automatically and we add them into the app in the correct sizes. We need to define what sizes images should have in the app.
The flow for the API would be different as we could get the right sizes from the server right away, but: The goal is that the app is useful without the orga server and runs by itself. So, we need the flow to work without the server and images that do not have the right size.
We have done something similar in the original open tech summit scraper.
Following up on our conversation today, I am still not sure, if we have the best solution, cause there are also valid points not to include the data. Let me understand what options we have if we only store the text data on the app. Could we also implement it in a way, that all image data gets downloaded in one row when the app opens the first time with a message "When you start the app the first time, we are downloading the latest event data. This can take a few minutes. Do you want to proceed now?"
Yes @mariobehling We can do this as well. After the data is downloaded, we can just cache it.
@mananwason @mariobehling I think that it would be a better idea to bundle all the assets at once in the zip (like icon for the app #403 and json files). What do you think?
In the Orga-Server we changed the JSON import/export into a zip file with all files inside. Please implement this for the app generator too. So users can import a the zipped JSON files instead of single files.