Skip to main content

Modul sledování polohy

Veškeré zdrojové soubory se nachází v ./tracking

TrackingButton

export function TrackingButton(props: {url})

Atributy

VariableTypeDescription
isTrackingboolZda je aktivní sledování polohy
watchIdRefnumberReference k aktivnímu sledování
lastSendTimeRefnumberReference k poslednímu odeslání polohy

Funkce

const sendLocationToServer = async (latitude: number, longitude: number)

Odešle polohu na API

const startTracking = async ()

Spuštění sledování

const stopTracking = async ()

Zastavení sledování

const toggleTracking = ()

Překliknutí stavu sledování

const createNotificationChannel = async ()

Vytvoření kanálů notifikací

const startForegroundService = async ()

Spuštění Foreground služby

const stopForegroundService = async ()

Zastavení Foreground služby