Actual Behaviour
As discussed in issue #1593 , our main aim is to allow event organiser to upload images either manually or using server code. Adding relevant code in generator.py .
Expected Behaviour
If images/speakers have speaker images they should be in the res folder.
Steps to reproduce it
-
LogCat for the issue
-
Screenshots of the issue
-
Would you like to work on the issue?
Yes
Target Milestone to solve the issue
Its ideal for an event having 10-20 speakers, but when there are too many speakers in 100s (like we have in fossasia summit or I/o) it will unnecessarily bloat the APK.
I don't think that including the images in the build is a good idea.
Then what should be the approach @m-murad ?
If a user uploads a zip with photographs, surely he is looking for these photos to be loaded in the app, or else he would have just used photo links in the JSON
No photos is worse than huge apk
Can i start working on this then?
Yes @arp95, but first let @niranjan94 approve
@m-murad it's completely upto the person who is creating the APK. We have the following cases
So, we need this feature. It's completely upto the user to do what he/she prefers. We're just giving them the choice.
@arp95 please go ahead.
Let's discuss the approach really quickly @arp95
We need to take milestones more seriously. This is due tomorrow. How should we handle the checking of status of the zip. After that, the copying of images will hardly take half an hour of code
Earlier we added code for the assets part right. What we can do is put the images in the apk and if that folder doesnt exist, the apk wont have that folder. Or is there a better way of doing it?
That is the easy part. I was asking about the detection of 3 cases which Niranjan pointed out. How will we guess which case the zip belong to. Whether to include images or not
is there a way we can check whether images/speaker folder exist during runtime, because if it does we know that the organizer wants to include images otherwise not.
Yes there is, but there can be a case where there are images too and the image links in JSON are provided as server images. In this case, we'll want to use server links only
I guess for now, include the images if they are present. A suggestion, when you move the images, do it in drawable-nodpi as it does not impose any restriction on the size of images
Also look at PIL to compress the images so that no image exceeds 1 MB, or else there is a risk of OOM exception
no i think in that case we have to include the images too for offline mode i guess.
yes you are right, for now adding them as it is.
Most helpful comment
@m-murad it's completely upto the person who is creating the APK. We have the following cases
So, we need this feature. It's completely upto the user to do what he/she prefers. We're just giving them the choice.
@arp95 please go ahead.