appium-android-driver 12.4.7 → 12.4.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/build/lib/commands/file-actions.d.ts +37 -19
  3. package/build/lib/commands/file-actions.d.ts.map +1 -1
  4. package/build/lib/commands/file-actions.js +44 -58
  5. package/build/lib/commands/file-actions.js.map +1 -1
  6. package/build/lib/commands/geolocation.d.ts +44 -36
  7. package/build/lib/commands/geolocation.d.ts.map +1 -1
  8. package/build/lib/commands/geolocation.js +38 -32
  9. package/build/lib/commands/geolocation.js.map +1 -1
  10. package/build/lib/commands/intent.d.ts +103 -107
  11. package/build/lib/commands/intent.d.ts.map +1 -1
  12. package/build/lib/commands/intent.js +103 -97
  13. package/build/lib/commands/intent.js.map +1 -1
  14. package/build/lib/commands/log.d.ts +44 -48
  15. package/build/lib/commands/log.d.ts.map +1 -1
  16. package/build/lib/commands/log.js +30 -54
  17. package/build/lib/commands/log.js.map +1 -1
  18. package/build/lib/commands/network.d.ts +59 -39
  19. package/build/lib/commands/network.d.ts.map +1 -1
  20. package/build/lib/commands/network.js +65 -45
  21. package/build/lib/commands/network.js.map +1 -1
  22. package/build/lib/commands/recordscreen.d.ts +25 -40
  23. package/build/lib/commands/recordscreen.d.ts.map +1 -1
  24. package/build/lib/commands/recordscreen.js +46 -63
  25. package/build/lib/commands/recordscreen.js.map +1 -1
  26. package/build/lib/commands/types.d.ts.map +1 -1
  27. package/build/lib/driver.d.ts +11 -10
  28. package/build/lib/driver.d.ts.map +1 -1
  29. package/build/lib/driver.js.map +1 -1
  30. package/lib/commands/{file-actions.js → file-actions.ts} +88 -74
  31. package/lib/commands/{geolocation.js → geolocation.ts} +85 -54
  32. package/lib/commands/intent.ts +422 -0
  33. package/lib/commands/{log.js → log.ts} +68 -73
  34. package/lib/commands/{network.js → network.ts} +106 -59
  35. package/lib/commands/{recordscreen.js → recordscreen.ts} +77 -73
  36. package/lib/commands/types.ts +17 -0
  37. package/lib/driver.ts +2 -1
  38. package/package.json +1 -1
  39. package/lib/commands/intent.js +0 -409
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## [12.4.9](https://github.com/appium/appium-android-driver/compare/v12.4.8...v12.4.9) (2025-12-19)
2
+
3
+ ### Miscellaneous Chores
4
+
5
+ * Migrate command modules to typescript (part3) ([#1040](https://github.com/appium/appium-android-driver/issues/1040)) ([ebc73ba](https://github.com/appium/appium-android-driver/commit/ebc73bac7433c552c41bc241bfec535c30b3b157))
6
+
7
+ ## [12.4.8](https://github.com/appium/appium-android-driver/compare/v12.4.7...v12.4.8) (2025-12-19)
8
+
9
+ ### Miscellaneous Chores
10
+
11
+ * Migrate command modules to typescript (part 2) ([#1039](https://github.com/appium/appium-android-driver/issues/1039)) ([163fdc6](https://github.com/appium/appium-android-driver/commit/163fdc6604a126e8a81a20f5ee54c98cfda9ecc1))
12
+
1
13
  ## [12.4.7](https://github.com/appium/appium-android-driver/compare/v12.4.6...v12.4.7) (2025-12-18)
2
14
 
3
15
  ### Miscellaneous Chores
@@ -1,34 +1,52 @@
1
+ import type { AndroidDriver } from '../driver';
1
2
  /**
2
- * @this {import('../driver').AndroidDriver}
3
- * @param {string} remotePath The full path to the remote file or a specially formatted path, which
3
+ * Pulls a file from the remote device.
4
+ *
5
+ * The full path to the remote file or a specially formatted path, which
4
6
  * points to an item inside an app bundle, for example `@my.app.id/my/path`.
5
7
  * It is mandatory for the app bundle to have debugging enabled in order to
6
8
  * use the latter `remotePath` format.
7
- * @returns {Promise<string>}
9
+ *
10
+ * @param remotePath The full path to the remote file or a specially formatted path, which
11
+ * points to an item inside an app bundle, for example `@my.app.id/my/path`.
12
+ * It is mandatory for the app bundle to have debugging enabled in order to
13
+ * use the latter `remotePath` format.
14
+ * @returns Promise that resolves to the file content as a base64-encoded string.
15
+ * @throws {errors.InvalidArgumentError} If the remote path points to a folder instead of a file.
8
16
  */
9
- export function pullFile(this: import("../driver").AndroidDriver, remotePath: string): Promise<string>;
17
+ export declare function pullFile(this: AndroidDriver, remotePath: string): Promise<string>;
10
18
  /**
11
- * @this {import('../driver').AndroidDriver}
12
- * @param {string} remotePath The full path to the remote file or a specially formatted path, which
19
+ * Pushes a file to the remote device.
20
+ *
21
+ * The full path to the remote file or a specially formatted path, which
22
+ * points to an item inside an app bundle, for example `@my.app.id/my/path`.
23
+ * It is mandatory for the app bundle to have debugging enabled in order to
24
+ * use the latter `remotePath` format.
25
+ *
26
+ * @param remotePath The full path to the remote file or a specially formatted path, which
13
27
  * points to an item inside an app bundle, for example `@my.app.id/my/path`.
14
28
  * It is mandatory for the app bundle to have debugging enabled in order to
15
29
  * use the latter `remotePath` format.
16
- * @param {string} base64Data Base64-encoded content of the file to be pushed.
17
- * @returns {Promise<void>}
30
+ * @param base64Data Base64-encoded content of the file to be pushed.
31
+ * Can be a string or an array of numbers (for Java clients that send byte arrays).
32
+ * @returns Promise that resolves when the file is pushed.
33
+ * @throws {errors.InvalidArgumentError} If the remote path points to a folder instead of a file.
18
34
  */
19
- export function pushFile(this: import("../driver").AndroidDriver, remotePath: string, base64Data: string): Promise<void>;
35
+ export declare function pushFile(this: AndroidDriver, remotePath: string, base64Data: string | number[]): Promise<void>;
20
36
  /**
21
- * @this {import('../driver').AndroidDriver}
22
- * @param {string} remotePath The full path to the remote folder
23
- * @returns {Promise<string>}
37
+ * Pulls a folder from the remote device.
38
+ *
39
+ * @param remotePath The full path to the remote folder.
40
+ * @returns Promise that resolves to the folder content as a base64-encoded zip file string.
24
41
  */
25
- export function pullFolder(this: import("../driver").AndroidDriver, remotePath: string): Promise<string>;
42
+ export declare function pullFolder(this: AndroidDriver, remotePath: string): Promise<string>;
26
43
  /**
27
- * @this {import('../driver').AndroidDriver}
28
- * @param {string} remotePath The full path to the remote file or a file inside an application bundle
29
- * (for example `@my.app.id/path/in/bundle`)
30
- * @returns {Promise<boolean>}
44
+ * Deletes a file from the remote device.
45
+ *
46
+ * @param remotePath The full path to the remote file or a file inside an application bundle
47
+ * (for example `@my.app.id/path/in/bundle`).
48
+ * @returns Promise that resolves to `true` if the file was successfully deleted, `false` if it doesn't exist.
49
+ * @throws {errors.InvalidArgumentError} If the remote path points to a folder instead of a file.
31
50
  */
32
- export function mobileDeleteFile(this: import("../driver").AndroidDriver, remotePath: string): Promise<boolean>;
33
- export type ADB = import("appium-adb").ADB;
51
+ export declare function mobileDeleteFile(this: AndroidDriver, remotePath: string): Promise<boolean>;
34
52
  //# sourceMappingURL=file-actions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"file-actions.d.ts","sourceRoot":"","sources":["../../../lib/commands/file-actions.js"],"names":[],"mappings":"AAUA;;;;;;;GAOG;AACH,8EANW,MAAM,GAIJ,OAAO,CAAC,MAAM,CAAC,CA2C3B;AAED;;;;;;;;GAQG;AACH,8EAPW,MAAM,cAIN,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CA+DzB;AAED;;;;GAIG;AACH,gFAHW,MAAM,GACJ,OAAO,CAAC,MAAM,CAAC,CAc3B;AAED;;;;;GAKG;AACH,sFAJW,MAAM,GAEJ,OAAO,CAAC,OAAO,CAAC,CAU5B;kBAiLY,OAAO,YAAY,EAAE,GAAG"}
1
+ {"version":3,"file":"file-actions.d.ts","sourceRoot":"","sources":["../../../lib/commands/file-actions.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,WAAW,CAAC;AAQ7C;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,QAAQ,CAC5B,IAAI,EAAE,aAAa,EACnB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,MAAM,CAAC,CAyCjB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,QAAQ,CAC5B,IAAI,EAAE,aAAa,EACnB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,GAC5B,OAAO,CAAC,IAAI,CAAC,CAgEf;AAED;;;;;GAKG;AACH,wBAAsB,UAAU,CAC9B,IAAI,EAAE,aAAa,EACnB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,MAAM,CAAC,CAYjB;AAED;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,aAAa,EACnB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,OAAO,CAAC,CAQlB"}
@@ -16,12 +16,19 @@ const CONTAINER_PATH_MARKER = '@';
16
16
  const CONTAINER_PATH_PATTERN = new RegExp(`^${CONTAINER_PATH_MARKER}([^/]+)/(.+)`);
17
17
  const ANDROID_MEDIA_RESCAN_INTENT = 'android.intent.action.MEDIA_SCANNER_SCAN_FILE';
18
18
  /**
19
- * @this {import('../driver').AndroidDriver}
20
- * @param {string} remotePath The full path to the remote file or a specially formatted path, which
19
+ * Pulls a file from the remote device.
20
+ *
21
+ * The full path to the remote file or a specially formatted path, which
22
+ * points to an item inside an app bundle, for example `@my.app.id/my/path`.
23
+ * It is mandatory for the app bundle to have debugging enabled in order to
24
+ * use the latter `remotePath` format.
25
+ *
26
+ * @param remotePath The full path to the remote file or a specially formatted path, which
21
27
  * points to an item inside an app bundle, for example `@my.app.id/my/path`.
22
28
  * It is mandatory for the app bundle to have debugging enabled in order to
23
29
  * use the latter `remotePath` format.
24
- * @returns {Promise<string>}
30
+ * @returns Promise that resolves to the file content as a base64-encoded string.
31
+ * @throws {errors.InvalidArgumentError} If the remote path points to a folder instead of a file.
25
32
  */
26
33
  async function pullFile(remotePath) {
27
34
  if (remotePath.endsWith('/')) {
@@ -44,7 +51,7 @@ async function pullFile(remotePath) {
44
51
  catch (e) {
45
52
  throw this.log.errorWithException(`Cannot access the container of '${packageId}' application. ` +
46
53
  `Is the application installed and has 'debuggable' build option set to true? ` +
47
- `Original error: ${ /** @type {Error} */(e).message}`);
54
+ `Original error: ${e.message}`);
48
55
  }
49
56
  }
50
57
  const localFile = await support_1.tempDir.path({ prefix: 'appium', suffix: '.tmp' });
@@ -62,13 +69,21 @@ async function pullFile(remotePath) {
62
69
  }
63
70
  }
64
71
  /**
65
- * @this {import('../driver').AndroidDriver}
66
- * @param {string} remotePath The full path to the remote file or a specially formatted path, which
72
+ * Pushes a file to the remote device.
73
+ *
74
+ * The full path to the remote file or a specially formatted path, which
75
+ * points to an item inside an app bundle, for example `@my.app.id/my/path`.
76
+ * It is mandatory for the app bundle to have debugging enabled in order to
77
+ * use the latter `remotePath` format.
78
+ *
79
+ * @param remotePath The full path to the remote file or a specially formatted path, which
67
80
  * points to an item inside an app bundle, for example `@my.app.id/my/path`.
68
81
  * It is mandatory for the app bundle to have debugging enabled in order to
69
82
  * use the latter `remotePath` format.
70
- * @param {string} base64Data Base64-encoded content of the file to be pushed.
71
- * @returns {Promise<void>}
83
+ * @param base64Data Base64-encoded content of the file to be pushed.
84
+ * Can be a string or an array of numbers (for Java clients that send byte arrays).
85
+ * @returns Promise that resolves when the file is pushed.
86
+ * @throws {errors.InvalidArgumentError} If the remote path points to a folder instead of a file.
72
87
  */
73
88
  async function pushFile(remotePath, base64Data) {
74
89
  if (remotePath.endsWith('/')) {
@@ -76,12 +91,16 @@ async function pushFile(remotePath, base64Data) {
76
91
  `'${remotePath}' is given instead`);
77
92
  }
78
93
  const localFile = await support_1.tempDir.path({ prefix: 'appium', suffix: '.tmp' });
94
+ let base64String;
79
95
  if (lodash_1.default.isArray(base64Data)) {
80
96
  // some clients (ahem) java, send a byte array encoding utf8 characters
81
97
  // instead of a string, which would be infinitely better!
82
- base64Data = Buffer.from(base64Data).toString('utf8');
98
+ base64String = Buffer.from(base64Data).toString('utf8');
99
+ }
100
+ else {
101
+ base64String = base64Data;
83
102
  }
84
- const content = Buffer.from(base64Data, 'base64');
103
+ const content = Buffer.from(base64String, 'base64');
85
104
  let tmpDestination = null;
86
105
  try {
87
106
  await support_1.fs.writeFile(localFile, content.toString('binary'), 'binary');
@@ -108,7 +127,7 @@ async function pushFile(remotePath, base64Data) {
108
127
  catch (e) {
109
128
  throw this.log.errorWithException(`Cannot access the container of '${packageId}' application. ` +
110
129
  `Is the application installed and has 'debuggable' build option set to true? ` +
111
- `Original error: ${ /** @type {Error} */(e).message}`);
130
+ `Original error: ${e.message}`);
112
131
  }
113
132
  }
114
133
  else {
@@ -129,9 +148,10 @@ async function pushFile(remotePath, base64Data) {
129
148
  }
130
149
  }
131
150
  /**
132
- * @this {import('../driver').AndroidDriver}
133
- * @param {string} remotePath The full path to the remote folder
134
- * @returns {Promise<string>}
151
+ * Pulls a folder from the remote device.
152
+ *
153
+ * @param remotePath The full path to the remote folder.
154
+ * @returns Promise that resolves to the folder content as a base64-encoded zip file string.
135
155
  */
136
156
  async function pullFolder(remotePath) {
137
157
  const tmpRoot = await support_1.tempDir.openDir();
@@ -146,10 +166,12 @@ async function pullFolder(remotePath) {
146
166
  }
147
167
  }
148
168
  /**
149
- * @this {import('../driver').AndroidDriver}
150
- * @param {string} remotePath The full path to the remote file or a file inside an application bundle
151
- * (for example `@my.app.id/path/in/bundle`)
152
- * @returns {Promise<boolean>}
169
+ * Deletes a file from the remote device.
170
+ *
171
+ * @param remotePath The full path to the remote file or a file inside an application bundle
172
+ * (for example `@my.app.id/path/in/bundle`).
173
+ * @returns Promise that resolves to `true` if the file was successfully deleted, `false` if it doesn't exist.
174
+ * @throws {errors.InvalidArgumentError} If the remote path points to a folder instead of a file.
153
175
  */
154
176
  async function mobileDeleteFile(remotePath) {
155
177
  if (remotePath.endsWith('/')) {
@@ -161,20 +183,15 @@ async function mobileDeleteFile(remotePath) {
161
183
  /**
162
184
  * Deletes the given folder or file from the remote device
163
185
  *
164
- * @param {ADB} adb
165
- * @param {string} remotePath The full path to the remote folder
166
- * or file (folder names must end with a single slash)
167
186
  * @throws {Error} If the provided remote path is invalid or
168
187
  * the package content cannot be accessed
169
- * @returns {Promise<boolean>} `true` if the remote item has been successfully deleted.
188
+ * @returns `true` if the remote item has been successfully deleted.
170
189
  * If the remote path is valid, but the remote path does not exist
171
190
  * this function return `false`.
172
- * @this {import('../driver').AndroidDriver}
173
191
  */
174
192
  async function deleteFileOrFolder(adb, remotePath) {
175
193
  const { isDir, isPresent, isFile } = createFSTests(adb);
176
194
  let dstPath = remotePath;
177
- /** @type {string|undefined} */
178
195
  let pkgId;
179
196
  if (remotePath.startsWith(CONTAINER_PATH_MARKER)) {
180
197
  const [packageId, pathInContainer] = parseContainerPath(remotePath);
@@ -189,7 +206,7 @@ async function deleteFileOrFolder(adb, remotePath) {
189
206
  catch (e) {
190
207
  throw this.log.errorWithException(`Cannot access the container of '${pkgId}' application. ` +
191
208
  `Is the application installed and has 'debuggable' build option set to true? ` +
192
- `Original error: ${ /** @type {Error} */(e).message}`);
209
+ `Original error: ${e.message}`);
193
210
  }
194
211
  }
195
212
  if (!(await isPresent(dstPath, pkgId))) {
@@ -218,9 +235,7 @@ async function deleteFileOrFolder(adb, remotePath) {
218
235
  /**
219
236
  * Parses the actual destination path from the given value
220
237
  *
221
- * @param {string} remotePath The preformatted remote path, which looks like
222
- * `@my.app.id/my/path`
223
- * @returns {Array<string>} An array, where the first item is the parsed package
238
+ * @returns An array, where the first item is the parsed package
224
239
  * identifier and the second one is the actual destination path inside the package.
225
240
  * @throws {Error} If the given string cannot be parsed
226
241
  */
@@ -236,9 +251,6 @@ function parseContainerPath(remotePath) {
236
251
  * Scans the given file/folder on the remote device
237
252
  * and adds matching items to the device's media library.
238
253
  * Exceptions are ignored and written into the log.
239
- *
240
- * @this {import('../driver').AndroidDriver}
241
- * @param {string} remotePath The file/folder path on the remote device
242
254
  */
243
255
  async function scanMedia(remotePath) {
244
256
  this.log.debug(`Performing media scan of '${remotePath}'`);
@@ -259,7 +271,7 @@ async function scanMedia(remotePath) {
259
271
  }
260
272
  }
261
273
  catch (e) {
262
- const err = /** @type {any} */ (e);
274
+ const err = e;
263
275
  // FIXME: what has a `stderr` prop?
264
276
  this.log.warn(`Ignoring an unexpected error upon media scanning of '${remotePath}': ${err.stderr ?? err.message}`);
265
277
  }
@@ -267,25 +279,14 @@ async function scanMedia(remotePath) {
267
279
  /**
268
280
  * A small helper, which escapes single quotes in paths,
269
281
  * so they are safe to be passed as arguments of shell commands
270
- *
271
- * @param {string} p The initial remote path
272
- * @returns {string} The escaped path value
273
282
  */
274
283
  function escapePath(p) {
275
284
  return p.replace(/'/g, `\\'`);
276
285
  }
277
286
  /**
278
287
  * Factory providing filesystem test functions using ADB
279
- * @param {ADB} adb
280
288
  */
281
289
  function createFSTests(adb) {
282
- /**
283
- *
284
- * @param {string} p
285
- * @param {'d'|'f'|'e'} op
286
- * @param {string} [runAs]
287
- * @returns
288
- */
289
290
  const performRemoteFsCheck = async (p, op, runAs) => {
290
291
  const passFlag = '__PASS__';
291
292
  const checkCmd = `[ -${op} '${escapePath(p)}' ] && echo ${passFlag}`;
@@ -297,25 +298,10 @@ function createFSTests(adb) {
297
298
  return false;
298
299
  }
299
300
  };
300
- /**
301
- * @param {string} p
302
- * @param {string} [runAs]
303
- */
304
301
  const isFile = async (p, runAs) => await performRemoteFsCheck(p, 'f', runAs);
305
- /**
306
- * @param {string} p
307
- * @param {string} [runAs]
308
- */
309
302
  const isDir = async (p, runAs) => await performRemoteFsCheck(p, 'd', runAs);
310
- /**
311
- * @param {string} p
312
- * @param {string} [runAs]
313
- */
314
303
  const isPresent = async (p, runAs) => await performRemoteFsCheck(p, 'e', runAs);
315
304
  return { isFile, isDir, isPresent };
316
305
  }
317
306
  // #endregion
318
- /**
319
- * @typedef {import('appium-adb').ADB} ADB
320
- */
321
307
  //# sourceMappingURL=file-actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"file-actions.js","sourceRoot":"","sources":["../../../lib/commands/file-actions.js"],"names":[],"mappings":";;;;;AAkBA,4BAyCC;AAWD,4BA6DC;AAOD,gCAYC;AAQD,4CAQC;AAtKD,oDAAuB;AACvB,6CAAuD;AACvD,gDAAwB;AACxB,0CAAqC;AAErC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAClC,kCAAkC;AAClC,MAAM,sBAAs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GAAG,KAAK,EAAE,CAAS,EAAE,KAAc,EAAoB,EAAE,CAClE,MAAM,oBAAoB,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;IAC5C,MAAM,SAAS,GAAG,KAAK,EAAE,CAAS,EAAE,KAAc,EAAoB,EAAE,CACtE,MAAM,oBAAoB,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;IAE5C,OAAO,EAAC,MAAM,EAAE,KAAK,EAAE,SAAS,EAAC,CAAC;AACpC,CAAC;AAED,aAAa"}
@@ -1,26 +1,28 @@
1
+ import type { Location } from '@appium/types';
2
+ import type { AndroidDriver } from '../driver';
1
3
  /**
2
- * @this {import('../driver').AndroidDriver}
3
- * @param {import('@appium/types').Location} location
4
- * @returns {Promise<import('@appium/types').Location>}
4
+ * Sets the device geolocation.
5
+ *
6
+ * @param location The geolocation object containing latitude, longitude, and altitude.
7
+ * @returns Promise that resolves to the current geolocation after setting it.
5
8
  */
6
- export function setGeoLocation(this: import("../driver").AndroidDriver, location: import("@appium/types").Location): Promise<import("@appium/types").Location>;
9
+ export declare function setGeoLocation(this: AndroidDriver, location: Location): Promise<Location>;
7
10
  /**
8
11
  * Set the device geolocation.
9
12
  *
10
- * @this {import('../driver').AndroidDriver}
11
- * @param {number} latitude Valid latitude value.
12
- * @param {number} longitude Valid longitude value.
13
- * @param {number} [altitude] Valid altitude value.
14
- * @param {number} [satellites] Number of satellites being tracked (1-12). Available for emulators.
15
- * @param {number} [speed] Valid speed value.
13
+ * @param latitude Valid latitude value.
14
+ * @param longitude Valid longitude value.
15
+ * @param altitude Valid altitude value.
16
+ * @param satellites Number of satellites being tracked (1-12). Available for emulators.
17
+ * @param speed Valid speed value.
16
18
  * https://developer.android.com/reference/android/location/Location#setSpeed(float)
17
- * @param {number} [bearing] Valid bearing value. Available for real devices.
19
+ * @param bearing Valid bearing value. Available for real devices.
18
20
  * https://developer.android.com/reference/android/location/Location#setBearing(float)
19
- * @param {number} [accuracy] Valid accuracy value. Available for real devices.
21
+ * @param accuracy Valid accuracy value. Available for real devices.
20
22
  * https://developer.android.com/reference/android/location/Location#setAccuracy(float),
21
23
  * https://developer.android.com/reference/android/location/Criteria
22
24
  */
23
- export function mobileSetGeolocation(this: import("../driver").AndroidDriver, latitude: number, longitude: number, altitude?: number, satellites?: number, speed?: number, bearing?: number, accuracy?: number): Promise<void>;
25
+ export declare function mobileSetGeolocation(this: AndroidDriver, latitude: number, longitude: number, altitude?: number, satellites?: number, speed?: number, bearing?: number, accuracy?: number): Promise<void>;
24
26
  /**
25
27
  * Sends an async request to refresh the GPS cache.
26
28
  *
@@ -28,43 +30,49 @@ export function mobileSetGeolocation(this: import("../driver").AndroidDriver, la
28
30
  * installed. In case the vanilla LocationManager is used the device API level
29
31
  * must be at version 30 (Android R) or higher.
30
32
  *
31
- * @this {import('../driver').AndroidDriver}
32
- * @param {number} [timeoutMs] The maximum number of milliseconds
33
+ * @param timeoutMs The maximum number of milliseconds
33
34
  * to block until GPS cache is refreshed. Providing zero or a negative
34
35
  * value to it skips waiting completely.
35
36
  * 20000ms by default.
36
- * @returns {Promise<void>}
37
+ * @returns Promise that resolves when the GPS cache refresh is initiated.
37
38
  */
38
- export function mobileRefreshGpsCache(this: import("../driver").AndroidDriver, timeoutMs?: number): Promise<void>;
39
+ export declare function mobileRefreshGpsCache(this: AndroidDriver, timeoutMs?: number): Promise<void>;
39
40
  /**
40
- * @this {import('../driver').AndroidDriver}
41
- * @returns {Promise<import('@appium/types').Location>}
41
+ * Gets the current device geolocation.
42
+ *
43
+ * @returns Promise that resolves to the current geolocation object.
42
44
  */
43
- export function getGeoLocation(this: import("../driver").AndroidDriver): Promise<import("@appium/types").Location>;
45
+ export declare function getGeoLocation(this: AndroidDriver): Promise<Location>;
44
46
  /**
45
- * @this {import('../driver').AndroidDriver}
46
- * @returns {Promise<import('@appium/types').Location>}
47
+ * Gets the current device geolocation.
48
+ *
49
+ * @returns Promise that resolves to the current geolocation object.
47
50
  */
48
- export function mobileGetGeolocation(this: import("../driver").AndroidDriver): Promise<import("@appium/types").Location>;
51
+ export declare function mobileGetGeolocation(this: AndroidDriver): Promise<Location>;
49
52
  /**
50
- * @this {import('../driver').AndroidDriver}
51
- * @returns {Promise<boolean>}
53
+ * Checks if location services are enabled.
54
+ *
55
+ * @returns Promise that resolves to `true` if location services are enabled, `false` otherwise.
52
56
  */
53
- export function isLocationServicesEnabled(this: import("../driver").AndroidDriver): Promise<boolean>;
57
+ export declare function isLocationServicesEnabled(this: AndroidDriver): Promise<boolean>;
54
58
  /**
55
- * @this {import('../driver').AndroidDriver}
56
- * @returns {Promise<void>}
59
+ * Toggles the location services state.
60
+ *
61
+ * @returns Promise that resolves when the location services state is toggled.
57
62
  */
58
- export function toggleLocationServices(this: import("../driver").AndroidDriver): Promise<void>;
63
+ export declare function toggleLocationServices(this: AndroidDriver): Promise<void>;
59
64
  /**
60
- * @this {import('../driver').AndroidDriver}
61
- * @returns {Promise<void>}
65
+ * Resets the geolocation to the default state.
66
+ *
67
+ * @returns Promise that resolves when the geolocation is reset.
68
+ * @throws {Error} If called on an emulator (geolocation reset does not work on emulators).
62
69
  */
63
- export function mobileResetGeolocation(this: import("../driver").AndroidDriver): Promise<void>;
70
+ export declare function mobileResetGeolocation(this: AndroidDriver): Promise<void>;
64
71
  /**
65
- * @this {import('../driver').AndroidDriver}
66
- * @param {string} appId
67
- * @returns {Promise<void>}
72
+ * Sets the mock location permission for a specific app.
73
+ *
74
+ * @param appId The application package identifier.
75
+ * @returns Promise that resolves when the mock location permission is set.
68
76
  */
69
- export function setMockLocationApp(this: import("../driver").AndroidDriver, appId: string): Promise<void>;
77
+ export declare function setMockLocationApp(this: AndroidDriver, appId: string): Promise<void>;
70
78
  //# sourceMappingURL=geolocation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"geolocation.d.ts","sourceRoot":"","sources":["../../../lib/commands/geolocation.js"],"names":[],"mappings":"AAeA;;;;GAIG;AACH,kFAHW,OAAO,eA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