react-native-geolocation-service
Advanced tools
Comparing version 5.3.0-beta.1 to 5.3.0-beta.2
# Changelog | ||
### 5.3.0-beta.2 (August 28, 2021) | ||
- Android: expose option to use LocationManager API | ||
### 5.3.0-beta.1 (April 23, 2021) | ||
@@ -4,0 +7,0 @@ - Android: update default build tools & sdk version |
@@ -1,20 +0,20 @@ | ||
declare module 'react-native-geolocation-service' { | ||
export type AuthorizationLevel = 'always' | 'whenInUse' | ||
declare module "react-native-geolocation-service" { | ||
export type AuthorizationLevel = "always" | "whenInUse"; | ||
export type AuthorizationResult = 'disabled' | 'granted' | 'denied' | 'restricted' | ||
export type AuthorizationResult = | ||
| "disabled" | ||
| "granted" | ||
| "denied" | ||
| "restricted"; | ||
export type AccuracyIOS = | ||
| 'bestForNavigation' | ||
| 'best' | ||
| 'nearestTenMeters' | ||
| 'hundredMeters' | ||
| 'kilometer' | ||
| 'threeKilometers' | ||
| 'reduced'; | ||
| "bestForNavigation" | ||
| "best" | ||
| "nearestTenMeters" | ||
| "hundredMeters" | ||
| "kilometer" | ||
| "threeKilometers" | ||
| "reduced"; | ||
export type AccuracyAndroid = | ||
| 'high' | ||
| 'balanced' | ||
| 'low' | ||
| 'passive'; | ||
export type AccuracyAndroid = "high" | "balanced" | "low" | "passive"; | ||
@@ -26,18 +26,19 @@ interface BaseOptions { | ||
}; | ||
enableHighAccuracy?: boolean | ||
distanceFilter?: number | ||
showLocationDialog?: boolean | ||
forceRequestLocation?: boolean | ||
enableHighAccuracy?: boolean; | ||
distanceFilter?: number; | ||
showLocationDialog?: boolean; | ||
forceRequestLocation?: boolean; | ||
forceLocationManager?: boolean; | ||
} | ||
interface GeoOptions extends BaseOptions { | ||
timeout?: number | ||
maximumAge?: number | ||
timeout?: number; | ||
maximumAge?: number; | ||
} | ||
interface GeoWatchOptions extends BaseOptions { | ||
interval?: number | ||
fastestInterval?: number | ||
useSignificantChanges?: boolean | ||
showsBackgroundLocationIndicator?: boolean | ||
interval?: number; | ||
fastestInterval?: number; | ||
useSignificantChanges?: boolean; | ||
showsBackgroundLocationIndicator?: boolean; | ||
} | ||
@@ -51,34 +52,34 @@ | ||
SETTINGS_NOT_SATISFIED = 5, | ||
INTERNAL_ERROR = -1 | ||
INTERNAL_ERROR = -1, | ||
} | ||
export interface GeoError { | ||
code: PositionError | ||
message: string | ||
code: PositionError; | ||
message: string; | ||
} | ||
export interface GeoCoordinates { | ||
latitude: number | ||
longitude: number | ||
accuracy: number | ||
altitude: number | null | ||
heading: number | null | ||
speed: number | null | ||
altitudeAccuracy?: number | null | ||
latitude: number; | ||
longitude: number; | ||
accuracy: number; | ||
altitude: number | null; | ||
heading: number | null; | ||
speed: number | null; | ||
altitudeAccuracy?: number | null; | ||
} | ||
export interface GeoPosition { | ||
coords: GeoCoordinates | ||
timestamp: number | ||
coords: GeoCoordinates; | ||
timestamp: number; | ||
mocked?: boolean; | ||
provider?: 'fused' | 'gps' | 'network' | 'passive'; | ||
provider?: "fused" | "gps" | "network" | "passive"; | ||
} | ||
type SuccessCallback = (position: GeoPosition) => void | ||
type SuccessCallback = (position: GeoPosition) => void; | ||
type ErrorCallback = (error: GeoError) => void | ||
type ErrorCallback = (error: GeoError) => void; | ||
export function requestAuthorization( | ||
authorizationLevel: AuthorizationLevel | ||
): Promise<AuthorizationResult> | ||
): Promise<AuthorizationResult>; | ||
@@ -89,3 +90,3 @@ export function getCurrentPosition( | ||
options?: GeoOptions | ||
): void | ||
): void; | ||
@@ -96,8 +97,7 @@ export function watchPosition( | ||
options?: GeoWatchOptions | ||
): number | ||
): number; | ||
export function clearWatch(watchID: number): void | ||
export function clearWatch(watchID: number): void; | ||
export function stopObserving(): void | ||
export function stopObserving(): void; | ||
} | ||
{ | ||
"name": "react-native-geolocation-service", | ||
"version": "5.3.0-beta.1", | ||
"version": "5.3.0-beta.2", | ||
"description": "React native geolocation service for iOS and android", | ||
@@ -5,0 +5,0 @@ "main": "js/index.js", |
@@ -78,5 +78,6 @@ # react-native-geolocation-service | ||
| enableHighAccuracy | `bool` | `false` | Use high accuracy mode | ||
| distanceFilter | `m` | `0` | Minimum displacement in meters | ||
| distanceFilter | `m` | `100` | Minimum displacement in meters | ||
| showLocationDialog | `bool` | `true` | Whether to ask to enable location in Android (android only) | ||
| forceRequestLocation | `bool` | `false` | Force request location even after denying improve accuracy dialog (android only) | ||
| forceLocationManager | `bool` | `false` | If set to `true`, will use android's default LocationManager API (android only) | ||
@@ -97,2 +98,3 @@ #### `watchPosition(successCallback, ?errorCallback, ?options)` | ||
| forceRequestLocation | `bool` | `false` | Force request location even after denying improve accuracy dialog (android only) | ||
| forceLocationManager | `bool` | `false` | If set to `true`, will use android's default LocationManager API (android only) | ||
| useSignificantChanges | `bool` | false | Uses the battery-efficient native significant changes APIs to return locations. Locations will only be returned when the device detects a significant distance has been breached (iOS only) | ||
@@ -99,0 +101,0 @@ | showsBackgroundLocationIndicator | `bool` | false | This setting enables a blue bar or a blue pill in the status bar on iOS. When the app moves to the background, the system uses this property to determine whether to change the status bar appearance to indicate that location services are in use. Users can tap the indicator to return to your app. (iOS only) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
82835
215
136