Had to share this since it was kind of a fun side project just to see if I could do it.
I found a way to live track a location based on trilateration and calculating the location based on the distance to three other known points. This will not report the location back to the database as it’s calculated locally on the device, but it could be combined with other actions to write the location to a sheet.
DISCLAIMER: This goes against Glide’s intentions with the Location component, which requires a user’s explicit permission to share their location each time it’s required. Because of that, I will not be sharing how I achieved this unless Glide explicitly agrees to it. It also is highly inaccurate once you start to get several miles away from your last calibrated location. (I don’t know if this is an error in my math, a limitation in the decimal precision of the math used, or the irregularities of earth itself.) I am not tracking or saving any location data, so there is no need to worry if you choose to play with the app. Everything should be kept anonymous as long as you don’t sign in. I just wanted to see if this was possible.
This method still asks for location access, but there is no switch required. This is purely based on math to calculate a location based on 3 known points. The funny thing is that technically this uses your GPS location to figure out your location and the distance to the 3 other locations, so it’s a bit counter-intuitive. I’m using my location to figure out my location. Weird right? It’s more a way of exposing a very complicated and inaccurate way to avoid the location switch.
There’s two buttons on the screen. A reset button to reset to an anonymous default location, and a Calibrate button, which should calibrate to find your current location. This will place a pin on both maps, but if you look closely, you will see the pin actually moving with your current location. It’s amazingly accurate around my home, but I haven’t tested it while actual moving a sizable distance from my home. I’m really curious how well it works for others around the world. I’m skeptical about how well it works, but a couple of tests with a GPS spoofer seems to prove that it does work pretty well.
Hehe, no, I’m not going to ask. Purely based on the response below. If Glide wanted to allow us to obtain a user’s location unprompted, I’m sure they would have given us that option. Totally understandable too. It would be way to easy to hide a location grab within a custom action. Like I said above, it’s using my current location to obtain my current location, so it’s a bit pointless in theory, although it would be awesome to skip the location switch, it does start to get into some scary territory of user tracking.
Well, I never said it was perfect. I think the calculations can get messed up if it calculates to zero in some cases, which throws the whole thing off. I tried to have the reset button zero out to 0 Latitude and 0 Longitude, but that didn’t work out very well, so I had to pick some off the wall location for the reset.
Or maybe the ‘,’ to ‘.’ decimal conversion is doing something weird???
Hi all, very nice looking app and very useful sample!
I have a question, can this app or how this app register the location and calculate distance for every 10 seconds, to register a path without user interaction?
Can this track app still working in backgroud?