I developped an Escape game. The app is the game "engine", and the different games are downloaded from the web allowing new games can be made available.
So the first time the app is installed, the different games must be downloaded. Each game haivng multiple files (text, sound, image), this may take a while. This is working fine and I display the percentage of downloaded files(using web component, when one file is downloaded, I start the download the next one).
The issue is when I try to publish the App, Google Play refuses to publish it, as the App is not responsive while downloading:
My main question is: Is it possible to avoid UI lock while downloading files? Generate the Button click event, even during file download to keep the app responsive and potentially abort the download. The main issue is that during a file download (GET), the User Inteface is not responsive anymore
Do not start the downloading until the app has loaded up. Perhaps give the user a Go button to start the downloading instead of starting it automatically
Give the user something to read (e.g. a nice long text file) while the downloading is going on
Set a progress bar of files downloaded so that the user can see how things are going
Thanks for all your input.
I am using a button to start the download and I display the progress of the download (percentage of download performed). The issue is not on the user experience, the issue is "I think" during Google automatic tests: they simulate pressing a button, but during the download, the buttons have no effect (no click event generated), and they consider the app is not responsive: "App contains buttons(s) that are not responsive"
Is there a way to allow/enable button click event during the download: after a Web GET? @ABG I'll try your proposal to start download from a timer to check if this could be a solution
It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.
To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.
Actually, I found that the issue is NOT the fact I am downloading files. The issue is that I use ShowProgressDialog component
during file download to show the progress (percentage of files downloaded), and after the Notifier ShowProgressDialog is called. ALL the buttons / UI is DISABLED and the App is no more responsive until the
DIsmisProgressDialog block is called
which is called at the end of the file download.
This is the desired behavior, see the documentation User Interface
ShowProgressDialog(message,title)
Shows a dialog box with an optional title and message (use empty strings if they are not wanted). This dialog box contains a spinning artifact to indicate that the program is working. It cannot be canceled by the user but must be dismissed by the App Inventor Program by using the DismissProgressDialog method.