does anyone have an aia on how to get “my location” in the current area and avoid duplication of that address and save it firebase? dont know how to implement it myself.
Only allow recording in Firebase if the difference between the last latitude and longitude is large
Last
Latitude 56,880
Long. 58,890
Now
Latitude. 56,882
Long. 58,905
If the difference is small (you define the difference) you do not record it on Firebase. There is a Topic that I answered here and it was the solution …
do you have sample aia? im really confused im beginner
yeah saw that lately but i dont know how to implement it
What did You try ?
Show us…
Create variables: last latitude last longitude start with 0 In the first comparison it will be zero and of course you will be recording in Firebase. After recording the latitude and longitude, assign these values to the variables. Compare these variables (they will always have the values of the last medication) to the values of the current latitude and longitude.
Only save data to Firebase if the measurements are different