Create a timer + texttospeech

Hello,

For my application I’d like to create a timer which will stop at a number of second that I provide thanks to a variable.
I don’t know how to do it with the Clock component or if it’s possible.
If so, does someone could give me some advice to make this timer or lead me to a topic.

Moreover, I’d like to know if it’s possible to add a TextToSpeech component which will be activated at a special time of the timer ?

The goal is : the athlete launch the timer and when the timer reach a special time, the app provide audible variable, then the athlete can still running.

I hope I was clear
Thank you for your attention

Sorry, App Inventor can not do that because the app cannot run in the background. AI2 apps cannot run as Services... what is needed. You can do this part "add a TextToSpeech component which will be activated at a special time of the timer" but it will only work while the app has the focus.

" I’d like to create a timer which will stop at a number of second that I provide thanks to a variable.
I don’t know how to do it with the Clock component or if it’s possible." Sure it is possible Clock . Use the Clock TimerInterval to set the 'delay' and use the Clock.Timer event to use the TextToSpeech TextToSpeech Speak method ( Speak( message ) Speaks the given message. )

What have you tried? Show your Blocks and some one will be glad to provide specific advice Clement.

Regards,
Steve

Well here is my blocks. I Used an app from the gallery which do what I want.


I did what I wanted (even if i didn’t finish yet) but there is one problem : I set two TimerInterval and one is faster than the other. How can I fix it ?
I’ve even “fixed” the problem of speed countdown by adding 0.25 instead of 1. But it is the same countdown for both timer and one is faster. So I don’t understand.

Thanks for your help
Clément