forked from capacitor-community/background-geolocation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
definitions.d.ts
37 lines (34 loc) · 856 Bytes
/
definitions.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
export interface WatcherOptions {
backgroundMessage?: string;
backgroundTitle?: string;
requestPermissions?: boolean;
stale?: boolean;
distanceFilter?: number;
}
export interface Location {
latitude: number;
longitude: number;
accuracy: number;
altitude: number | null;
altitudeAccuracy: number | null;
isMock: boolean | null;
bearing: number | null;
speed: number | null;
time: number | null;
}
export interface CallbackError extends Error {
code?: string;
}
export interface BackgroundGeolocationPlugin {
addWatcher(
options: WatcherOptions,
callback: (
position?: Location,
error?: CallbackError
) => void
): Promise<string>;
removeWatcher(options: {
id: string
}): Promise<void>;
openSettings(): Promise<void>;
}