appium-android-driver
Version:
Android UiAutomator and Chrome support for Appium
70 lines • 3.33 kB
TypeScript
/**
* @this {import('../driver').AndroidDriver}
* @param {import('@appium/types').Location} location
* @returns {Promise<import('@appium/types').Location>}
*/
export function setGeoLocation(this: import("../driver").AndroidDriver, location: import("@appium/types").Location): Promise<import("@appium/types").Location>;
/**
* Set the device geolocation.
*
* @this {import('../driver').AndroidDriver}
* @param {number} latitude Valid latitude value.
* @param {number} longitude Valid longitude value.
* @param {number} [altitude] Valid altitude value.
* @param {number} [satellites] Number of satellites being tracked (1-12). Available for emulators.
* @param {number} [speed] Valid speed value.
* https://developer.android.com/reference/android/location/Location#setSpeed(float)
* @param {number} [bearing] Valid bearing value. Available for real devices.
* https://developer.android.com/reference/android/location/Location#setBearing(float)
* @param {number} [accuracy] Valid accuracy value. Available for real devices.
* https://developer.android.com/reference/android/location/Location#setAccuracy(float),
* https://developer.android.com/reference/android/location/Criteria
*/
export function mobileSetGeolocation(this: import("../driver").AndroidDriver, latitude: number, longitude: number, altitude?: number, satellites?: number, speed?: number, bearing?: number, accuracy?: number): Promise<void>;
/**
* Sends an async request to refresh the GPS cache.
*
* This feature only works if the device under test has Google Play Services
* installed. In case the vanilla LocationManager is used the device API level
* must be at version 30 (Android R) or higher.
*
* @this {import('../driver').AndroidDriver}
* @param {number} [timeoutMs] The maximum number of milliseconds
* to block until GPS cache is refreshed. Providing zero or a negative
* value to it skips waiting completely.
* 20000ms by default.
* @returns {Promise<void>}
*/
export function mobileRefreshGpsCache(this: import("../driver").AndroidDriver, timeoutMs?: number): Promise<void>;
/**
* @this {import('../driver').AndroidDriver}
* @returns {Promise<import('@appium/types').Location>}
*/
export function getGeoLocation(this: import("../driver").AndroidDriver): Promise<import("@appium/types").Location>;
/**
* @this {import('../driver').AndroidDriver}
* @returns {Promise<import('@appium/types').Location>}
*/
export function mobileGetGeolocation(this: import("../driver").AndroidDriver): Promise<import("@appium/types").Location>;
/**
* @this {import('../driver').AndroidDriver}
* @returns {Promise<boolean>}
*/
export function isLocationServicesEnabled(this: import("../driver").AndroidDriver): Promise<boolean>;
/**
* @this {import('../driver').AndroidDriver}
* @returns {Promise<void>}
*/
export function toggleLocationServices(this: import("../driver").AndroidDriver): Promise<void>;
/**
* @this {import('../driver').AndroidDriver}
* @returns {Promise<void>}
*/
export function mobileResetGeolocation(this: import("../driver").AndroidDriver): Promise<void>;
/**
* @this {import('../driver').AndroidDriver}
* @param {string} appId
* @returns {Promise<void>}
*/
export function setMockLocationApp(this: import("../driver").AndroidDriver, appId: string): Promise<void>;
//# sourceMappingURL=geolocation.d.ts.map