I'm developing an app which fuses location from various providers, hoping it will give a more accurate location than if I simply used the Google API. However, the choice of providers would depend on the phone being indoor or outdoor (Network vs GPS, for example).
What is the best way to detect if the device is indoor or outdoor? My first thought would be using the Light sensor, and maybe cell signal strength and WiFi (if there are WiFi networks near, it's likely the device is indoor), but I don't know which weight/confidence I should attribute to these sensors.
Edit: this is for my masters thesis, in which the goal is to get the location from the different providers (GPS, Network and Passive) in the Android API, and fuse them with a formula. Depending on whether the phone is indoor or outdoor, the several locations would have different weights. There would also be parameters like if battery life is priority or not (I haven't developed this formula yet).
Just subscribe to both providers and use location.getProvider()
and location.getAccuracy()
when new location arrives--to check if it's more/less accurate then previous.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With