I don’t use Timers so I’m not the best person to answer that. But I would think you could as long as the interval is long enough. Some API responses can take quite a few seconds to complete so if you had an API that took 10 seconds to respond and your timer interval was every 5 seconds, it obviously wouldn’t work correctly.
This is only a sample and not mirroring your data.
API is a service on servers and to avoid overloading the server the provider will have a type of usage policy such as the time between calls to the API and the number of calls in a certain time so you have to check with your provider how many calls in an hour or in one day.
i know, the reason is i have the same app build with appinventor (there it is possible to set timer event for auto refresh (only android) now i want to do it for IOS.
In addition to what @muneer wrote about server calls, it’s important to understand the difference between how often API data is updated (on the server) and how long it takes to make the call and get the response in Thunkable.
You can time this by setting a variable’s value to the seconds since 1970 block in the Device drawer and then checking the value again (or subtracting) after the JSON response is available. Do this a bunch of times to get an average response time. And then set your timer interval slightly longer than that.
This all depends on the API server you’re using and the specific call you’re making. I’ve had APIs take less than a second to complete this process and others that took over 10 seconds.
I think these are public APIs to use, i mean, these apis are widely used because they provide the main data of the bitcoin blockchain for many
the only thing that surprises me a bit is that the update only works in the web view, on the mobile phone connected to tunkable it doesn’t work, maybe just transmission errors?
I believe you jump to conclusions very quickly just as you jump from one question to another in this post.
Firstly, most API calls will not work from the web test. You are just being lucky again that this one works.
Secondly, API calls are data structures and requires headers and containers to transmit them. Most of them needs content type to be specified among other settings which should be given by the official documentation.
You need to look for required setup when run from an app not from a web page.
The main questions on the topic have been clarified, so as not to open any further topics and to stay with this topic, does it make more sense to do this here, i guess
I just want to understand the differences between the two app builders, they can’t be that different, it works actuall with the same build, just the item list pick is different and i needed to know how.
I know how the API works.
My other app has been working for months and is requesting the same api data with no problem
That wasn’t my question, at least it wasn’t a question. It was just a statement that it probably won’t update during the test connection, in case I’m wrong clear me up. (or does web and app view use a different test transmission?)
PS: I just had to refresh Thunkable and the mobile device connection (see it as a bug report)