다음을 통해 공유


LocationManager.AddNmeaListener Method

Definition

Overloads

AddNmeaListener(GpsStatus+INmeaListener)

No-op method to keep backward-compatibility.

AddNmeaListener(IOnNmeaMessageListener)

Adds an NMEA listener.

AddNmeaListener(IOnNmeaMessageListener, Handler)

Adds an NMEA listener.

AddNmeaListener(IExecutor, IOnNmeaMessageListener)

Adds an NMEA listener.

AddNmeaListener(GpsStatus+INmeaListener)

No-op method to keep backward-compatibility.

[Android.Runtime.Register("addNmeaListener", "(Landroid/location/GpsStatus$NmeaListener;)Z", "GetAddNmeaListener_Landroid_location_GpsStatus_NmeaListener_Handler")]
[Android.Runtime.RequiresPermission("android.permission.ACCESS_FINE_LOCATION")]
public virtual bool AddNmeaListener (Android.Locations.GpsStatus.INmeaListener listener);
[<Android.Runtime.Register("addNmeaListener", "(Landroid/location/GpsStatus$NmeaListener;)Z", "GetAddNmeaListener_Landroid_location_GpsStatus_NmeaListener_Handler")>]
[<Android.Runtime.RequiresPermission("android.permission.ACCESS_FINE_LOCATION")>]
abstract member AddNmeaListener : Android.Locations.GpsStatus.INmeaListener -> bool
override this.AddNmeaListener : Android.Locations.GpsStatus.INmeaListener -> bool

Parameters

listener
GpsStatus.INmeaListener

a GpsStatus NmeaListener object to register

Returns

Attributes

Exceptions

if the ACCESS_FINE_LOCATION permission is not present

Remarks

Java documentation for android.location.LocationManager.addNmeaListener(android.location.NmeaListener).

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

AddNmeaListener(IOnNmeaMessageListener)

Adds an NMEA listener.

[Android.Runtime.Register("addNmeaListener", "(Landroid/location/OnNmeaMessageListener;)Z", "GetAddNmeaListener_Landroid_location_OnNmeaMessageListener_Handler", ApiSince=24)]
[Android.Runtime.RequiresPermission("android.permission.ACCESS_FINE_LOCATION")]
public virtual bool AddNmeaListener (Android.Locations.IOnNmeaMessageListener listener);
[<Android.Runtime.Register("addNmeaListener", "(Landroid/location/OnNmeaMessageListener;)Z", "GetAddNmeaListener_Landroid_location_OnNmeaMessageListener_Handler", ApiSince=24)>]
[<Android.Runtime.RequiresPermission("android.permission.ACCESS_FINE_LOCATION")>]
abstract member AddNmeaListener : Android.Locations.IOnNmeaMessageListener -> bool
override this.AddNmeaListener : Android.Locations.IOnNmeaMessageListener -> bool

Parameters

listener
IOnNmeaMessageListener

the listener to register

Returns

true always

Attributes

Remarks

Adds an NMEA listener.

See #addNmeaListener(Executor, OnNmeaMessageListener) for more detail on how this method works.

This member is deprecated. Use #addNmeaListener(OnNmeaMessageListener, Handler) or #addNmeaListener(Executor, OnNmeaMessageListener) instead.

Java documentation for android.location.LocationManager.addNmeaListener(android.location.OnNmeaMessageListener).

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

AddNmeaListener(IOnNmeaMessageListener, Handler)

Adds an NMEA listener.

[Android.Runtime.Register("addNmeaListener", "(Landroid/location/OnNmeaMessageListener;Landroid/os/Handler;)Z", "GetAddNmeaListener_Landroid_location_OnNmeaMessageListener_Landroid_os_Handler_Handler", ApiSince=24)]
[Android.Runtime.RequiresPermission("android.permission.ACCESS_FINE_LOCATION")]
public virtual bool AddNmeaListener (Android.Locations.IOnNmeaMessageListener listener, Android.OS.Handler? handler);
[<Android.Runtime.Register("addNmeaListener", "(Landroid/location/OnNmeaMessageListener;Landroid/os/Handler;)Z", "GetAddNmeaListener_Landroid_location_OnNmeaMessageListener_Landroid_os_Handler_Handler", ApiSince=24)>]
[<Android.Runtime.RequiresPermission("android.permission.ACCESS_FINE_LOCATION")>]
abstract member AddNmeaListener : Android.Locations.IOnNmeaMessageListener * Android.OS.Handler -> bool
override this.AddNmeaListener : Android.Locations.IOnNmeaMessageListener * Android.OS.Handler -> bool

Parameters

listener
IOnNmeaMessageListener

the listener to register

handler
Handler

the handler that the listener runs on

Returns

true always

Attributes

Remarks

Adds an NMEA listener.

See #addNmeaListener(Executor, OnNmeaMessageListener) for more detail on how this method works.

Java documentation for android.location.LocationManager.addNmeaListener(android.location.OnNmeaMessageListener, android.os.Handler).

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

AddNmeaListener(IExecutor, IOnNmeaMessageListener)

Adds an NMEA listener.

[Android.Runtime.Register("addNmeaListener", "(Ljava/util/concurrent/Executor;Landroid/location/OnNmeaMessageListener;)Z", "GetAddNmeaListener_Ljava_util_concurrent_Executor_Landroid_location_OnNmeaMessageListener_Handler", ApiSince=30)]
[Android.Runtime.RequiresPermission("android.permission.ACCESS_FINE_LOCATION")]
public virtual bool AddNmeaListener (Java.Util.Concurrent.IExecutor executor, Android.Locations.IOnNmeaMessageListener listener);
[<Android.Runtime.Register("addNmeaListener", "(Ljava/util/concurrent/Executor;Landroid/location/OnNmeaMessageListener;)Z", "GetAddNmeaListener_Ljava_util_concurrent_Executor_Landroid_location_OnNmeaMessageListener_Handler", ApiSince=30)>]
[<Android.Runtime.RequiresPermission("android.permission.ACCESS_FINE_LOCATION")>]
abstract member AddNmeaListener : Java.Util.Concurrent.IExecutor * Android.Locations.IOnNmeaMessageListener -> bool
override this.AddNmeaListener : Java.Util.Concurrent.IExecutor * Android.Locations.IOnNmeaMessageListener -> bool

Parameters

executor
IExecutor

the executor that the listener runs on

listener
IOnNmeaMessageListener

the listener to register

Returns

true always

Attributes

Remarks

Adds an NMEA listener. GNSS NMEA information will only be received while the #GPS_PROVIDER is enabled, and while the client app is in the foreground.

Java documentation for android.location.LocationManager.addNmeaListener(java.util.concurrent.Executor, android.location.OnNmeaMessageListener).

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