TempoBuilder

class TempoBuilder

TempoBuilder is use to build TempoService object

Since

15.3.0

Constructors

Link copied to clipboard
fun TempoBuilder()

Properties

Link copied to clipboard
val destinationId: String? = null

(Mandatory) destinationId to start Tempo

Link copied to clipboard
val notification: Notification? = null

(Mandatory) foreground notification to be used for foreground service

Link copied to clipboard
val notificationId: Int? = null

Id to display foreground notification

Functions

Link copied to clipboard
fun destinationId(destinationId: String): TempoService.TempoBuilder

destinationId of the Zone for Tempo tracking Mandatory for Building TempoService

Link copied to clipboard
fun notification(notification: Notification): TempoService.TempoBuilder

Notification to be used to run the Tempo service as a foreground service. Mandatory for Building TempoService

Link copied to clipboard
fun notificationId(id: Int): TempoService.TempoBuilder

Id to use when starting the Tempo service as a foreground service. If your app is already displaying a persistent notification for a foreground service, pass in the id used to have Tempo service make use of the same notification, avoiding having your application displaying multiple persistent notifications. Either service may be stopped without affected any other service using the same notification id. Mandatory for Building TempoService

Link copied to clipboard
fun start(context: Context, tempoStatusListener: TempoServiceStatusListener)

Call this method to start Tempo. Before calling this function, make sure that the application has the correct location permissions. We recommend checking that the correct location permissions are granted each time prior to calling this function. Thus, it is important to call this function while the application is in the foreground, so the user can respond to the location authorization prompt.