Calculating the duration of the user's absence on the discussion application, accompanied by blocks and aia file

modified slightly…

LastSeen.aia (65.4 KB)

@Still-learning
I’m sorry, but there is a problem with the aia files that you send to me, not all of them work for me

are you using any VPN? what error you are getting? Is the website blocked in your country? Where are you from?

This works

but that doesn’t work
modified slightly…

LastSeen.aia (65.4 KB)
I’m from Tunisia
@Still-learning

Is this site working for your place?

http://worldtimeapi.org/api/ip

…YES


@Still-learning

@Still-learning This is an app taken from this

may be this block do problem,. just copy paste the above url in this block and try

image

change into like this,

image

@Still-learning
Well, I will do your orders right now

No… No… Just suggestion… Problem means that place only i feel the disturbance but it is working well for me even in companion as well as in apk

Thank you very much, it has already worked and in this update it means that the days will be counted, right
@Still-learning

Yes.. If the difference goes more than a day then it will appear… But if the user reinstall or clears app data it is not possible to show… Make into apk… wait for a day then open the app, you will feel the difference and i hope this is what you expect

What does this mean when you delete the app and re-download these blocks will crash

You mean the days that were there before deleting the application, they will not appear in it again. This is normal. The new days will appear
@Still-learning

Since we are storing the last visit in tinydb, app collects the data and stored as a cache file in app folder. whenever app open first it will check/read this value only. If the user deleted the app or from the app settings if he clears the data then this tinydb will b lost/erased/delete and app will consider that this is first running from the beginning and not from where he left last…

@Still-learning @dora_paz
I sent an email to the site owners and they advised me not to use their site in the app. Do you think the app will crash after a while?

i hope this iste only is being used by many kodulars for couple of years and so for no problem they are facing… If so then you can go for paid API… I hope they wont change… If not you have to use some other website and grab the data

I found this sentence on their site:

Please note that there is a fair-use policy in place; any attempt to make many requests in a short timeframe will find the requests are forbidden.

Therefore, this API should not be used:

Do I suppose that an application that has had many users a million or more, this means that it will crash

of course…

My question is, why do you want to use Online time? Why dont you use system time for this purpose??