On Sat, Dec 29, 2012 at 8:13 PM, Jake Colman <[email protected]> wrote:
> I guess when "best" returns NULL it really means there ain't
> nothing available to satisfy my request.

Ignoring the double negative, you are correct. getBestProvider() will
progressively relax constraints you specified in your Criteria to try
to give *something*, but if it does so and there are still no matches,
you get null.

> That was really the core of my question.

TreKing's list seems pretty good.

You can add "screwball device that doesn't meet the CDD/CTS but has a
pirated version of the Play Store on it anyway" as another
possibility. I've seen reports of weird stuff related to locations
(and maps) with such devices. However, this is a fringe case, unless
you're specifically trying to distribute to such devices.

> If "best" returns NULL I have
> to assume that I cannot determine the location - and then do something
> accordingly.

Yup. Popping a dialog that leads the user over to the Location portion
of Settings seems to be a popular option, figuring that the issue is
that the user has providers disabled. I get caught by that a fair bit,
as I keep GPS disabled on my personal phone unless I am actively
trying to use it. Occasionally, I'll try to get into Google
Navigation, and it will yelp because I have GPS disabled.

--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

In questi siti web puoi chiedere o rispondere a domande relative allo
sviluppo di applicazioni Android: http://www.andglobe.com

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to