SafetyLocations

Interface to safety location providers. To obtain safety location data, a client must first subscribe by registering safety location options, then call function provide to fetch data according to those options.

Important: This is a Public Preview API. It may be changed or removed at any time.

Functions

Link copied to clipboard

Provides safety location data for the given options, if the data is available in the cache.

Link copied to clipboard

Subscribes to safety location data with configuration options that specify the rectangular areas and the safety location types in the areas of interest. To receive the data, a client must call the provide() method after subscribing. It is the client's responsibility to unsubscribe from safety location data for all the sets of safety location options previously registered.

Link copied to clipboard

Unsubscribes from safety location data by unregistering a previously registered safety location options. After unsubscribing with specific safety location options, calling function provide might still return safety location data for the options, for example if there is still such data in the cache. It is the client's responsibility to unsubscribe from safety location data for all the sets of safety location options previously registered.

Inherited functions

Link copied to clipboard
abstract fun close()