aychihuahua-background-service
v0.0.18
Published
Move App to forground and background
Maintainers
Readme
aychihuahua-background-service
Move App to forground and background
Install
npm install aychihuahua-background-service
npx cap syncAPI
moveToForeground()startWatchService(...)requestAllTimePermissions()checkAllTheTimeLocationPermission()stopWatchService()getLastLocation()getlocation()- Interfaces
- Type Aliases
moveToForeground()
moveToForeground() => Promise<void>startWatchService(...)
startWatchService(options: { token: string; id: number; requestId?: number; clientId?: number[]; expectedArrivalTime?: string; }, locationCallback: LocationCallback) => Promise<LocationUpdate>| Param | Type |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------ |
| options | { token: string; id: number; requestId?: number; clientId?: number[]; expectedArrivalTime?: string; } |
| locationCallback | LocationCallback |
Returns: Promise<LocationUpdate>
requestAllTimePermissions()
requestAllTimePermissions() => Promise<{ value: string; }>Returns: Promise<{ value: string; }>
checkAllTheTimeLocationPermission()
checkAllTheTimeLocationPermission() => Promise<{ value: boolean; }>Returns: Promise<{ value: boolean; }>
stopWatchService()
stopWatchService() => Promise<void>getLastLocation()
getLastLocation() => Promise<{ lat: number; lng: number; }>Returns: Promise<{ lat: number; lng: number; }>
getlocation()
getlocation() => Promise<{ lat: number; lng: number; }>Returns: Promise<{ lat: number; lng: number; }>
Interfaces
LocationUpdate
| Prop | Type |
| ----------- | ------------------- |
| coord | any |
| speed | number |
Type Aliases
LocationCallback
(message: LocationUpdate | null, err?: any): void
