Android LocationManager

class enamlnative.android.android_location.LocationManager(*args, **kwargs)[source]

Bases: enamlnative.android.android_content.SystemService

class LocationListener(ref: Optional[enamlnative.core.bridge.BridgeObject] = None, **kwargs)[source]

Bases: enamlnative.android.bridge.JavaProxy

listeners

Active listeners

async classmethod start(callback, provider='gps', min_time=1000, min_distance=0)[source]

Convenience method that checks and requests permission if necessary and if successful calls the callback with a populated Location instance on updates.

Note you must have the permissions in your manifest or requests will be denied immediately.

classmethod stop()[source]

Stops location updates if currently updating.

async classmethod check_permission(fine=True) bool[source]

Returns a future that returns a boolean indicating if permission is currently granted or denied. If permission is denied, you can request using LocationManager.request_permission() below.

async classmethod request_permission(fine=True) bool[source]

Requests permission and returns an async result that returns a boolean indicating if the permission was granted or denied.

__del__()[source]

Remove any listeners before destroying