Actual Behaviour
Currently the file download doesnt show a progress bar showing how much of the file is downloaded.
Expected Behaviour
Showing the progress bar of how much file has downloaded.
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
@iamareebjamal please add this.
https://github.com/fossasia/open-event-android/milestone/34
@arp95 doesn't the browser already show a download progress ?
i meant showing the progress in percentage above the status messages as we have in the web app generator. @niranjan94
we just have the status messages displayed for now.
Show progress bar of file download in apk generator
You do get a download progress provided by browsers once the download starts right ?

sorry the issue is not that intuitive from the name.
but what i want is to show the progress along with the percentage above it. should i go ahead it? @niranjan94
Okay ... Then could you please change the issue title accordingly ? Maybe something in the lines of Show visual progress of the app generation process
Sure ... You can go ahead with it. Just propose how you plan to implement it here first please ...
yes sure @niranjan94
i am providing with the implementation in a while.

@niranjan94 @iamareebjamal @Shailesh351 @shreyasnbhat @rohanagarwal94
i made above changes which i was talking about earlier. only thing is the part to handle the percent upload correctly, please see the rest is fine or not?
@arp95 I wanted to know your idea for getting the progress percentage ...
@arp95 This would be a nice addition.
@niranjan94 i am thinking as follows:
in the generator.py file we are passing meta object having message proeprty. in that i will add another item holding the status message number currently executed like from 1-10.
now in main.js we are accessing the res.state, res.message as i could see while submitting the form in the file. i would access the res.item which i added and update the percentage according to that. also i need to divide the current value with a total value which means res.total would also be needed.
correct me if i am wrong.
Cool 馃憤 ... Go for it
@niranjan94
also there is also one way which requires changes only in client side. i will update the percent progress on the status message received. that is if this status message make the progress this much etc.
what do you think?
All the FE should ideally do is, display the data from the backend. FE shouldn't make much decisions on its own. Keep this at the backend. So that it can be re-used when implementing with the Open Event API Server too.
yes you are right. actually i tried that method and i changed the generator.py file function:
def update_status():
meta = {'message': message, 'loaded': loaded, 'total': total};
and in the api.py where we are sending the jsonify() function i changed it as:
return jsonify(state=state, result=info)
but the main.js doesnt seem to receive through res.result.loaded?
what am i doing wrong? @niranjan94
@arp95
def update_status(self, state, exception=None, message=None, skip_log=False):
if not skip_log:
logger.info(state)
if self.task_handle:
if not current_app.config.get('CELERY_ALWAYS_EAGER'):
meta = {}
if exception:
meta = {'exc': exception}
if message:
meta = {'message': message}
self.task_handle.update_state(
state=state, meta=meta
)
In this where exactly did you add ?
If you had added it at meta = {'message': message}, it would send only when the whole app generation is complete. Because until then, message=None
So, you should do what you want to do at meta = {}
if message:
meta = {'message': message, 'loaded': loaded, 'total': total}
here i did the addition.
Then please read what I said above.
So, you should do what you want to do at聽
meta = {}
@arp95 I know you're trying to increase your contributions to the project by picking up multiple issues. But it would really be better for you if you first try to understand how the generator works. It seems to me that you still haven't gone through the existing codebase properly.
@niranjan94
it always seem demotivating when you change the language to work on in the middle knowing the others arent working on the generator at all.
i know you are not always there to help me around but if i am taking a step amongst others to improve the generator why i am on the back firing line?
anyways a word of encouragement is always good but if you have a negative feedback about me it is fine then...
@arp95 I'm actually trying to help you out here.
it always demotivating when you change the language to work on in the middle
Why do you think of it a demotivating factor ? Why can't it be a way to learn a language ? Some new tech. GSoC isn't always about just doing what you normally do. Working with the same language you have been working for the past few years. it's an opportunity to try out some new stuff. But its not gonna be easy. I know. Last year when I applied for GSoC, I didn't know head or tail about python. And I applied for a python project. And learnt it.
knowing the others arent working on the generator at all
Never compare yourself with the negative aspects of others. If someone else is contributing a lot, use that to motivate yourself to contribute more. But if someone isn't working at all, ignore that you make sure you don't go down to that level. Stop comparing.
i know you are not always there to help me around but if i am taking a step amongst others to improve the generator why i am on the back firing line?
You're not on the _firing line_. There isn't any firing line anywhere around here actually. I'm just doing what I usually do. Pointing out mistakes and suggesting something you could do to improve. Why do you think of me as a _firing squad_. (Using your analogy)
anyways a word of encouragement is always good but if you have a negative feedback about me it is fine then...
This isn't negative feedback. It's just a _neutral_ feedback which I'm hoping would help you.
Experience shows that super long discussions without code contributions have limited benefit to the project.
@arp95 I already see that this issue is not properly started and lacks sufficient information right at the beginning. It seems you have difficulties following standard community practices.
I am not up for getting in discussions into what is encouraging, motivating, demotivating and questions and feelings. I see that generally there is a good and constructive atmosphere in the projects here and feedback is about actual code and getting things to work.
Unfortunately many issues and PRs you are involved in tend to be very long. In contributions of many other developers in contrast I see that discussions are usually much shorter and code gets merged more quickly. So, please take a step back and review your own engagement here and focus on understanding the project and providing quality code and solutions to issues.
@mariobehling sure.
Most helpful comment
Experience shows that super long discussions without code contributions have limited benefit to the project.
@arp95 I already see that this issue is not properly started and lacks sufficient information right at the beginning. It seems you have difficulties following standard community practices.
I am not up for getting in discussions into what is encouraging, motivating, demotivating and questions and feelings. I see that generally there is a good and constructive atmosphere in the projects here and feedback is about actual code and getting things to work.
Unfortunately many issues and PRs you are involved in tend to be very long. In contributions of many other developers in contrast I see that discussions are usually much shorter and code gets merged more quickly. So, please take a step back and review your own engagement here and focus on understanding the project and providing quality code and solutions to issues.