Skip to content

Location#

flet_onesignal.location.OneSignalLocation #

OneSignal Location namespace.

Provides methods for managing location sharing with OneSignal.

Functions#

get_permission async #

get_permission(timeout: float = 10) -> bool

Check if location permission is currently granted.

Returns:

Type Description
bool

True if permission is granted, False otherwise.

is_shared async #

is_shared(timeout: float = 25) -> bool

Check if location is currently being shared with OneSignal.

Returns:

Type Description
bool

True if location is shared, False otherwise.

request_permission async #

request_permission(timeout: float = 25) -> bool

Request permission to access location.

Returns:

Type Description
bool

True if permission was granted, False otherwise.

set_shared async #

set_shared(shared: bool) -> None

Set whether location data should be shared with OneSignal.

Parameters:

Name Type Description Default
shared bool

True to share location, False to stop sharing.

required