Android.Locations.LocationManager.GetBestProvider Method
Returns the name of the provider that best meets the given criteria.

Syntax

[Android.Runtime.Register("getBestProvider", "(Landroid/location/Criteria;Z)Ljava/lang/String;", "GetGetBestProvider_Landroid_location_Criteria_ZHandler")]
public virtual string GetBestProvider (Criteria criteria, bool enabledOnly)

Parameters

criteria
the criteria that need to be matched
enabledOnly
if true then only a provider that is currently enabled is returned

Returns

Documentation for this section has not yet been entered.

Remarks

Returns the name of the provider that best meets the given criteria. Only providers that are permitted to be accessed by the calling activity will be returned. If several providers meet the criteria, the one with the best accuracy is returned. If no provider meets the criteria, the criteria are loosened in the following sequence:

  • power requirement
  • accuracy
  • bearing
  • speed
  • altitude

Note that the requirement on monetary cost is not removed in this process.

[Android Documentation]

Requirements

Namespace: Android.Locations
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1