Seva-coder / Finder

Application for remote phone search
GNU General Public License v3.0
115 stars 23 forks source link

Sometimes GPS takes too long to connect. Does Finder also use cell tower triangulation? #37

Open tdbe opened 4 years ago

tdbe commented 4 years ago

Hi, new-ish user here. I tried an experiment last night to find a phone that was indoors. I sent the request location sms, and thought it wasn't working and forgot about it; then I got a correct reply but around one hour later. (possibly in the meantime the phone got moved closer to a window or smth so it got a better gps signal)

Am I correct in assuming that Finder tries to connect to enough GPS satellites until it gets an accurate enough (~15m location)? I would very much like if possible an alternative/backup option where it uses cell tower triangulation or otherwise something closer to google's "high accuracy" location because that is much faster and works (better) indoors.

Cheers. Dependable app otherwise, good job.

(PS: I did make sure the app can be auto-started by OS, and doesn't get battery optimized etc)

Seva-coder commented 4 years ago

Hi, yes - you are right. When Finder use gps it try to get location using accuracy from settings. If it has location, but accuracy is bad - after some time (also from settings) app send available coordinates (with bad accuracy). But app already has second way to get location - via wifi-nets and mobile nets. It is such named "wifi-request", when second smartphone scan wifi networks around and send this data to first phone. First phone get mac's, surrounding second phone, and via google api (simple https post-request) get true coordinates of second phone. It takes less 1 minute...

in new version I will made some improvements and all services will be "foreground", it should improves reliability of app

tdbe commented 4 years ago

It seems that "wifi-request" only looks around for macs of wifi networks -- and does not use cellphone tower triangulation for location.

I did some more experimenting where gps wasn't working usefully and thought "wifi" request would do it, but I got a reply with 0 or 1 macs which was not enough to get a location.

Is there a reason you are not using cell tower triangulation? (never tried it myself so I don't know much about how doable it is / what is required)

Seva-coder commented 4 years ago

thats strange.. Towers are should also be used for location. Here is code, responsible for this feature - https://github.com/Seva-coder/Finder/blob/5495566c318a695d3fdf54849847da0ee6e4ca13/app/src/main/java/ru/seva/finder/WifiSearch.java#L178 It adds to sms: type of network, MCC, MNC, LAC and CID. May be it crashed due to some reasons..

I think logging crashes (without automatic sending) could help in solving such situations

tdbe commented 4 years ago

Thanks for clarifying. Good to know. I wasn't sure what "MCC, MNC, LAC and CID" meant before :) I will investigate further soon-ish.