import { PermissionStatus } from 'unimodules-permissions-interface'; import { LocationAccuracy, LocationCallback, LocationGeocodedAddress, LocationGeocodedLocation, LocationHeadingCallback, LocationHeadingObject, LocationLastKnownOptions, LocationObject, LocationOptions, LocationPermissionResponse, LocationProviderStatus, LocationRegion, LocationSubscription, LocationTaskOptions, LocationActivityType, LocationGeofencingEventType, LocationGeofencingRegionState, LocationGeocodingOptions } from './Location.types'; import { LocationEventEmitter } from './LocationEventEmitter'; import { setGoogleApiKey } from './LocationGoogleGeocoding'; import { _getCurrentWatchId } from './LocationSubscribers'; export declare function getProviderStatusAsync(): Promise; export declare function enableNetworkProviderAsync(): Promise; /** * Requests for one-time delivery of the user's current location. * Depending on given `accuracy` option it may take some time to resolve, * especially when you're inside a building. */ export declare function getCurrentPositionAsync(options?: LocationOptions): Promise; /** * Gets the last known position of the device or `null` if it's not available * or doesn't match given requirements such as maximum age or required accuracy. * It's considered to be faster than `getCurrentPositionAsync` as it doesn't request for the current location. */ export declare function getLastKnownPositionAsync(options?: LocationLastKnownOptions): Promise; /** * Starts watching for location changes. * Given callback will be called once the new location is available. */ export declare function watchPositionAsync(options: LocationOptions, callback: LocationCallback): Promise<{ remove(): void; }>; /** * Resolves to an object with current heading details. * To simplify, it calls `watchHeadingAsync` and waits for a couple of updates * and returns the one that is accurate enough. */ export declare function getHeadingAsync(): Promise; /** * Starts watching for heading changes. * Given callback will be called once the new heading is available. */ export declare function watchHeadingAsync(callback: LocationHeadingCallback): Promise; /** * Geocodes given address to an array of latitude-longitude coordinates. */ export declare function geocodeAsync(address: string, options?: LocationGeocodingOptions): Promise; /** * The opposite behavior of `geocodeAsync` — translates location coordinates to an array of addresses. */ export declare function reverseGeocodeAsync(location: Pick, options?: LocationGeocodingOptions): Promise; /** * Gets the current state of location permissions. */ export declare function getPermissionsAsync(): Promise; /** * Requests the user to grant location permissions. */ export declare function requestPermissionsAsync(): Promise; /** * Returns `true` if the device has location services enabled or `false` otherwise. */ export declare function hasServicesEnabledAsync(): Promise; export declare function isBackgroundLocationAvailableAsync(): Promise; export declare function startLocationUpdatesAsync(taskName: string, options?: LocationTaskOptions): Promise; export declare function stopLocationUpdatesAsync(taskName: string): Promise; export declare function hasStartedLocationUpdatesAsync(taskName: string): Promise; export declare function startGeofencingAsync(taskName: string, regions?: LocationRegion[]): Promise; export declare function stopGeofencingAsync(taskName: string): Promise; export declare function hasStartedGeofencingAsync(taskName: string): Promise; /** * Deprecated as of SDK39 */ export declare function setApiKey(apiKey: string): void; export { LocationEventEmitter as EventEmitter, _getCurrentWatchId }; export { LocationAccuracy as Accuracy, LocationActivityType as ActivityType, LocationGeofencingEventType as GeofencingEventType, LocationGeofencingRegionState as GeofencingRegionState, PermissionStatus, setGoogleApiKey, }; export { installWebGeolocationPolyfill } from './GeolocationPolyfill'; export * from './Location.types';