Udostępnij za pośrednictwem


LocationManager.GetProvider(String) Method

Definition

Returns the information about the location provider with the given name, or null if no provider exists by that name.

[Android.Runtime.Register("getProvider", "(Ljava/lang/String;)Landroid/location/LocationProvider;", "GetGetProvider_Ljava_lang_String_Handler")]
public virtual Android.Locations.LocationProvider? GetProvider (string provider);
[<Android.Runtime.Register("getProvider", "(Ljava/lang/String;)Landroid/location/LocationProvider;", "GetGetProvider_Ljava_lang_String_Handler")>]
abstract member GetProvider : string -> Android.Locations.LocationProvider
override this.GetProvider : string -> Android.Locations.LocationProvider

Parameters

provider
String

a provider listed by #getAllProviders()

Returns

location provider information, or null if provider does not exist

Attributes

Exceptions

if name is null or does not exist

if the caller is not permitted to access the given provider.

Remarks

Returns the information about the location provider with the given name, or null if no provider exists by that name.

This member is deprecated. This method has no way to indicate that a provider's properties are unknown, and so may return incorrect results on rare occasions. Use #getProviderProperties(String) instead.

Java documentation for android.location.LocationManager.getProvider(java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to