Android Question GPS location of a stationary device

DickD

Active Member
Licensed User
I am using the GPS code from the tutorial on this topic. It seems to work fine on most phones but not on some others (e.g. Moto Droid Turbo with Android 6.0.1). The process hangs and never completes to the LocationChanged event. I think this has something to do with it's being a stationary device. If I move the phone from one side of the office or building to the other the lat and long are eventually discovered.

The function seems to depend on movement of the device. How can I find the location of a stationary device that is sitting on my desk in my office and not going anywhere?
 

DonManfred

Expert
Licensed User
Longtime User
The function seems to depend on movement of the device
No. GPS depends on reaching Satelites which it does not find Indoors. Run the example app and monitor the Satelites-list... instead of false your should have true if a satelite can be found and is fixed. You need at least 4 Satelites to get a Position.

GPS is not a good solution for Indoor.

In your test you probably have a better GPS Signal at the other place in your Office you moved the device to.
 
Last edited:
Upvote 0

DickD

Active Member
Licensed User
No. GPS depends on reaching Satelites which it does not find Indoors. Run the example app and monitor the Satelites-list... instead of false your should have true if a satelite can be found and is fixed. You need at least 4 Satelites to get a Position.

GPS is not a good solution for Indoor.

In your test you probably have a better GPS Signal at the other place in your Office you moved the device to.
Actually I have had good luck with other phones finding their location even in large single story buildings like chain restaurants, supermarkets, hardware stores etc. Not so in multi-story concrete and steel buildings.

Is there a solution for finding locations indoors? I have seen mention on the forum of things like FusedLocationProvider and others.
 
Upvote 0

Peter Simpson

Expert
Licensed User
Longtime User
You should use FusedLocationProvider, your app does not need to rely on the GPS, just the best last known location which might already be the last known GPS/tower location/WiFi etc etc etc. I use FusedLocationProvider with apps on smart watches that don't even have GPS, it works perfectly fine. Give it a go as it works on tablets and phones as well.
 
Last edited:
Upvote 0
Top