Time of the Day for closs platform app

When I want to do something in my app, in the certain time of the day, how can I make this? I see only timer, which can count milliseconds from the moment starting the app or pressing some button, but do not see any capability to get the device local time of the day.

What I exactly want is, for example, at 9 am show a message1 and at 8 pm show a message2.

I’m interested to do this for the cross platfrom app (x.thunkable.com), not just for iOS app.

Some logic like this - IF clock1=“19:30:00” DO show LABEL1=“This is the local message2”?

Try using for example the service https://timezonedb.com/ to get the time.

Basic example. First you need to register on the service and get a KEY. Then try using the browser to get the time you need (there are examples on the service). If this happens, use the block below to get the time in Thunkable X.

2 Likes

If I create android only app, can I do the detection of 89 am and 8 pm in more easy way?

To do this in Thunkable X is not, but in Thunkable Classic it’s possible. Details can be found in the AndroidDiscuss discussion thread.

Here is still such a solution. To work with time, you use Javascript in the Web Viewer, and to exchange data between the Web Viewer and the native part of the Thunkable X component of RealtimeDB. That is, the exchange of data through Firebase. But this method is more complicated than I showed earlier.