Hi, I wanted to know how to switch beteen GPS and Network providers.
Iam now busy with making a program that shows the location of the phone holder on the google map. I want to make use of both the GPS provider and the network provider. I prefer using gps. When gps is not temporarily unavailable then the program chooses for the network provider. But when the gps is available again I want the program to use the gps again. At this moment my program is only able to switch to network provider when gps is not available but it cant check whether gps is back again. here is how it is done: @Override public void onStatusChanged(String provider, int status, Bundle b) { if (status == LocationProvider.OUT_OF_SERVICE) { lm.requestLocationUpdates (LocationManager.NETWORK_PROVIDER, mInterval, 0, this); } else if(status == LocationProvider.TEMPORARILY_UNAVAILABLE){ lm.requestLocationUpdates (LocationManager.NETWORK_PROVIDER, mInterval, 0, this); } } Could someone please tell me how to check the status of the gps while the location manager is using the Network provider? thank you --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---