Display firebase data time to time

okay..but if have few equipment data in the firebase, how do i do it?

Meaning :thinking:

As you can see, i choose the equipment first.. to get their latitude and longitude. But now my question is, how to display in the app the latitude and longitude data of each equipment in real time without clicking any button?

image

Put the code in a clock timer.

How are you storing the latitude and longitude?

It would really help others to help you if you posted an image of your relevant blocks and your firebase data.

Okay will try this

Using gps module

image

Introduce a clock timer. On first click of your button you will be taken to the location, then you start the clock timer at the same time. Every interval (e.g. 1 minute, 5 minutes) the location will be checked again. If the lat/lon coordinates have changed, the map will change.

Thank you so much but is there any chance to display the data without clicking the button?

You can start the clock/run the button procedure in Screen.Initialise, or have another clock timer start it.

Note, this will only work while the app is open, the clock will eventually stop if the app moves into the background

means it wont display data if we close the app?

Correct. But if the app is closed, it cannot display the data, can it ?

that is what I'm wondering

To get the data while the app is closed, you may need a background tasks extension and a notification extension to send the data to the device

how do i do that? :cry: I'm sorry that I'm asking too many questions... still a beginner for this app.

Hi...I want retrieve the value under "detect". If the value is 1, it means the power cable is cut...so the app sends warning through call.
image

image
At the same time, i want the app keep updating the data with date and time. And i keep getting as image below.