How to display data from firebase in apps time to time?
okay..but if have few equipment data in the firebase, how do i do it?
Meaning
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?
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
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? I'm sorry that I'm asking too many questions... still a beginner for this app.