I have a bunch of people reporting an error that I cannot reproduce. When trying to open a MapView
it\'s reporting that the getBestProvider
is retu
In your call to getBestProvider()
you've asked for enabled providers only (that's the second parameter in the method call which you have set to true
). If the user has disabled all providers, you will get null
.
In any case, you need to be able to deal with the situation where there are no available providers, so you'll need to check for null
and tell the user that he has not enabled any location.