location.LocationTask
Resolve when the fixes are handled; throw or reject to report a failed run.
Usage
Persist each batch of positions delivered to a background location task.
This type is used by location.defineUpdates
// Persist each batch of positions delivered to a background location task.
import { location, storage } from 'kuito';
location.defineUpdates('trip', async (run: location.LocationTaskRun) => {
await storage.set('latest-trip-batch', JSON.stringify(run.locations));
});
// Register at module scope. Declare background location and obtain permission
// before calling location.startUpdates('trip').Type declaration
export type LocationTask = (run: LocationTaskRun) => Promise<void> | void;Type
(run: LocationTaskRun) => Promise<void> | voidGenerated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.