I am working on geolocation application in that I want to use Gps provider as it giving accurate location than network provider.But sometimes indoor the gps signal is not reaching then I want to use network provider.Whenever Gps signal is not reaching that time I want to use network provider.How can I switch between these providers?
Thanks,
Vishakha.
If you have a button that switches a variable on or off, you can switch between providers like this (Sorry that it’s pseudo code).
Also it depends on whether you want it to detect automatically. If that’s the case, you might want to check the location return from your current locationProvider(whether it’s GPS or Network) and determine how accurate it is and switch accordingly.