Make a pause function

Hi, here's my code:

image

Can you tell me why before calling "Pause" function (5 seconds), the RESPONSE.TEXT is not displayed ?
The code show the text after 5 seconds...
if i remove this function, all is ok.

Thank you for this issue

Richard, welcome to the community.

If you would like to ask help, please show all of the relevant blocks, including the contents of the Pause procedure. Right-click and choose "Download blocks as PNG" to download a high-resoluted image.

Hi,
In my App, i sent a HTTP post request to my server.
My server takes few seconds to make a MP3 file.

is it possible to pause the script until the file is generated ?

For example, my url is "http:\www.mysite\Audio.mp3"
When Audio.mp3 is generated, i can call the Player function to start to play this file.

Thank you for your reply.

this is my pause function:

Thank you

Because of the way that AppInventor works, it is a bad idea to use a wait procedure. [see here] You can try something like this instead.

blocks (1)

Nice method !

this is an alternative for my problem.

But instead of waiting 5 seconds, is there a way to check that a file is generated on my web server.

here want i want:

Wait until a file is generated

Thank you

mp3 file generated on server? how do you know it's finished from your phone?

Yes, that's i want.

the phone must check if the file exist on my web server.
if the file doesn't exist, then the phone have to wait again until this file is generated.

then Check every 2 or 5 second .

do you know how to check if the file exist on a web server ?

Thank you

You need to setup some api on server to return the status.

is there no easy way else ?

What does "generated" on my server mean?
Where does the MP3 file come from?

If you have php....

My phone send a request to my Web Server.

Then the Web Server generate a MP3 file.
It takes few seconds to make the MP3 file.

How my phone knows that the file is ready to download ?
How can I test this ?

Thank you for your help

how did you set up the server?in which language ? java?php?nodejs?

Again: What does "make the MP3" mean?
How is it created?