fossasia / open-event-droidgen

Open Event Android App Generator https://github.com/fossasia/open-event-android/raw/apk/sample-apk-fossasia17-development.apk
GNU General Public License v3.0
2.06k stars 828 forks source link

Adopt file import to import zip with all JSON files #434

Closed mariobehling closed 8 years ago

mariobehling commented 8 years ago

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.

mananwason commented 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?

mariobehling commented 8 years ago

Just zip in future.

the-dagger commented 8 years ago

@mananwason let's update the existing parent issue to reference to this. And close the older one which is regarding uploading json files.

mananwason commented 8 years ago

Yes @the-dagger Was just doing the same

mananwason commented 8 years ago

@mariobehling 👍

mariobehling commented 8 years ago

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

mananwason commented 8 years ago

@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

mariobehling commented 8 years ago

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.

mariobehling commented 8 years ago

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?"

mananwason commented 8 years ago

Yes @mariobehling We can do this as well. After the data is downloaded, we can just cache it.

the-dagger commented 8 years ago

@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?