GroupLocationService

abstract class GroupLocationService(context: Context) : BaseService

An abstract class representing a GroupLocationService, which provides methods for sharing and listening to group locations. It extends the BaseService class and requires a context parameter for initialization.

Parameters

context

The context used for initialization and performing operations.

Inheritors

Constructors

Link copied to clipboard
constructor(context: Context)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract fun onEvent(eventCallback: EventCallback<GroupEvent>)

Registers an event callback for receiving group location events.

Link copied to clipboard
abstract fun startListeningToGroups(): Flow<List<GroupUser>>

Starts listening to group updates and returns a flow of group users. This will allow you to receive location update from other group members.

abstract fun startListeningToGroups(eventCallback: EventCallback<List<GroupUser>>)

Starts listening to group updates and registers an event callback. This will allow you to receive location update from other group members.

Link copied to clipboard
abstract fun startSharingLocation(onLocationSent: EventCallback<Location>)

Starts sharing the device's location with the group. The other group members will be able to receive your current location.

Link copied to clipboard
abstract fun stopListeningToGroups()

Stops listening to group updates. This will stop location update from other group members.

Link copied to clipboard
abstract fun stopSharingLocation()

Stops sharing the device's location with the group. The other group members will stop getting your location update.