@capgo/camera-preview 8.3.6 → 8.3.8-beta.pr356.31.1

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.
package/dist/docs.json CHANGED
@@ -128,6 +128,52 @@
128
128
  ],
129
129
  "slug": "capturesample"
130
130
  },
131
+ {
132
+ "name": "startBarcodeScanner",
133
+ "signature": "(options?: BarcodeScannerOptions | undefined) => Promise<void>",
134
+ "parameters": [
135
+ {
136
+ "name": "options",
137
+ "docs": "",
138
+ "type": "BarcodeScannerOptions | undefined"
139
+ }
140
+ ],
141
+ "returns": "Promise<void>",
142
+ "tags": [
143
+ {
144
+ "name": "since",
145
+ "text": "8.8.0"
146
+ },
147
+ {
148
+ "name": "platform",
149
+ "text": "android, ios, web"
150
+ }
151
+ ],
152
+ "docs": "Starts barcode scanning on the active camera preview.\n\nThe scanner reuses the current camera session and emits `barcodeScanned` events.\nCall `stopBarcodeScanner()` when scanning is no longer needed.\n\nAndroid uses the lightweight Google Play Services ML Kit model. If the model is not installed yet,\nfirst scans may return no result until Google Play Services finishes downloading it.",
153
+ "complexTypes": [
154
+ "BarcodeScannerOptions"
155
+ ],
156
+ "slug": "startbarcodescanner"
157
+ },
158
+ {
159
+ "name": "stopBarcodeScanner",
160
+ "signature": "() => Promise<void>",
161
+ "parameters": [],
162
+ "returns": "Promise<void>",
163
+ "tags": [
164
+ {
165
+ "name": "since",
166
+ "text": "8.8.0"
167
+ },
168
+ {
169
+ "name": "platform",
170
+ "text": "android, ios, web"
171
+ }
172
+ ],
173
+ "docs": "Stops barcode scanning while keeping the camera preview running.",
174
+ "complexTypes": [],
175
+ "slug": "stopbarcodescanner"
176
+ },
131
177
  {
132
178
  "name": "getSupportedFlashModes",
133
179
  "signature": "() => Promise<{ result: CameraPreviewFlashMode[]; }>",
@@ -151,19 +197,19 @@
151
197
  },
152
198
  {
153
199
  "name": "setAspectRatio",
154
- "signature": "(options: { aspectRatio: '4:3' | '16:9'; x?: number; y?: number; }) => Promise<{ width: number; height: number; x: number; y: number; }>",
200
+ "signature": "(options: { aspectRatio: CameraPreviewAspectRatio; x?: number; y?: number; }) => Promise<{ width: number; height: number; x: number; y: number; }>",
155
201
  "parameters": [
156
202
  {
157
203
  "name": "options",
158
- "docs": "- The desired aspect ratio and optional position.\n- aspectRatio: The desired aspect ratio ('4:3' or '16:9')\n- x: Optional x coordinate for positioning. If not provided, view will be auto-centered horizontally.\n- y: Optional y coordinate for positioning. If not provided, view will be auto-centered vertically.",
159
- "type": "{ aspectRatio: '4:3' | '16:9'; x?: number | undefined; y?: number | undefined; }"
204
+ "docs": "- The desired aspect ratio and optional position.\n- aspectRatio: The desired aspect ratio ('4:3', '16:9', or 'fill')\n- x: Optional x coordinate for positioning. If not provided, view will be auto-centered horizontally.\n- y: Optional y coordinate for positioning. If not provided, view will be auto-centered vertically.",
205
+ "type": "{ aspectRatio: CameraPreviewAspectRatio; x?: number | undefined; y?: number | undefined; }"
160
206
  }
161
207
  ],
162
208
  "returns": "Promise<{ width: number; height: number; x: number; y: number; }>",
163
209
  "tags": [
164
210
  {
165
211
  "name": "param",
166
- "text": "options - The desired aspect ratio and optional position.\n- aspectRatio: The desired aspect ratio ('4:3' or '16:9')\n- x: Optional x coordinate for positioning. If not provided, view will be auto-centered horizontally.\n- y: Optional y coordinate for positioning. If not provided, view will be auto-centered vertically."
212
+ "text": "options - The desired aspect ratio and optional position.\n- aspectRatio: The desired aspect ratio ('4:3', '16:9', or 'fill')\n- x: Optional x coordinate for positioning. If not provided, view will be auto-centered horizontally.\n- y: Optional y coordinate for positioning. If not provided, view will be auto-centered vertically."
167
213
  },
168
214
  {
169
215
  "name": "returns",
@@ -179,14 +225,16 @@
179
225
  }
180
226
  ],
181
227
  "docs": "Set the aspect ratio of the camera preview.",
182
- "complexTypes": [],
228
+ "complexTypes": [
229
+ "CameraPreviewAspectRatio"
230
+ ],
183
231
  "slug": "setaspectratio"
184
232
  },
185
233
  {
186
234
  "name": "getAspectRatio",
187
- "signature": "() => Promise<{ aspectRatio: '4:3' | '16:9'; }>",
235
+ "signature": "() => Promise<{ aspectRatio: CameraPreviewAspectRatio; }>",
188
236
  "parameters": [],
189
- "returns": "Promise<{ aspectRatio: '4:3' | '16:9'; }>",
237
+ "returns": "Promise<{ aspectRatio: CameraPreviewAspectRatio; }>",
190
238
  "tags": [
191
239
  {
192
240
  "name": "returns",
@@ -202,7 +250,9 @@
202
250
  }
203
251
  ],
204
252
  "docs": "Gets the current aspect ratio of the camera preview.",
205
- "complexTypes": [],
253
+ "complexTypes": [
254
+ "CameraPreviewAspectRatio"
255
+ ],
206
256
  "slug": "getaspectratio"
207
257
  },
208
258
  {
@@ -895,6 +945,72 @@
895
945
  ],
896
946
  "slug": "addlistenerorientationchange-"
897
947
  },
948
+ {
949
+ "name": "addListener",
950
+ "signature": "(eventName: 'barcodeScanned', listenerFunc: (data: BarcodeScannedEvent) => void) => Promise<PluginListenerHandle>",
951
+ "parameters": [
952
+ {
953
+ "name": "eventName",
954
+ "docs": "",
955
+ "type": "'barcodeScanned'"
956
+ },
957
+ {
958
+ "name": "listenerFunc",
959
+ "docs": "",
960
+ "type": "(data: BarcodeScannedEvent) => void"
961
+ }
962
+ ],
963
+ "returns": "Promise<PluginListenerHandle>",
964
+ "tags": [
965
+ {
966
+ "name": "since",
967
+ "text": "8.8.0"
968
+ },
969
+ {
970
+ "name": "platform",
971
+ "text": "android, ios, web"
972
+ }
973
+ ],
974
+ "docs": "Adds a listener for barcode scan results.",
975
+ "complexTypes": [
976
+ "PluginListenerHandle",
977
+ "BarcodeScannedEvent"
978
+ ],
979
+ "slug": "addlistenerbarcodescanned-"
980
+ },
981
+ {
982
+ "name": "addListener",
983
+ "signature": "(eventName: 'barcodeScanError', listenerFunc: (data: BarcodeScanErrorEvent) => void) => Promise<PluginListenerHandle>",
984
+ "parameters": [
985
+ {
986
+ "name": "eventName",
987
+ "docs": "",
988
+ "type": "'barcodeScanError'"
989
+ },
990
+ {
991
+ "name": "listenerFunc",
992
+ "docs": "",
993
+ "type": "(data: BarcodeScanErrorEvent) => void"
994
+ }
995
+ ],
996
+ "returns": "Promise<PluginListenerHandle>",
997
+ "tags": [
998
+ {
999
+ "name": "since",
1000
+ "text": "8.8.0"
1001
+ },
1002
+ {
1003
+ "name": "platform",
1004
+ "text": "android, web"
1005
+ }
1006
+ ],
1007
+ "docs": "Adds a listener for non-fatal barcode scanner errors.",
1008
+ "complexTypes": [
1009
+ "PluginListenerHandle",
1010
+ "BarcodeScanErrorEvent"
1011
+ ],
1012
+ "slug": "addlistenerbarcodescanerror-"
1013
+ },
898
1014
  {
899
1015
  "name": "deleteFile",
900
1016
  "signature": "(options: { path: string; }) => Promise<{ success: boolean; }>",
@@ -1177,8 +1293,10 @@
1177
1293
  }
1178
1294
  ],
1179
1295
  "docs": "The aspect ratio of the camera preview, '4:3' or '16:9' or 'fill'.\nCannot be set if width or height is provided, otherwise the call will be rejected.\nUse setPreviewSize to adjust size after starting.",
1180
- "complexTypes": [],
1181
- "type": "'4:3' | '16:9' | undefined"
1296
+ "complexTypes": [
1297
+ "CameraPreviewAspectRatio"
1298
+ ],
1299
+ "type": "CameraPreviewAspectRatio"
1182
1300
  },
1183
1301
  {
1184
1302
  "name": "aspectMode",
@@ -1218,7 +1336,7 @@
1218
1336
  "name": "includeSafeAreaInsets",
1219
1337
  "tags": [
1220
1338
  {
1221
- "text": "ios",
1339
+ "text": "android, ios",
1222
1340
  "name": "platform"
1223
1341
  },
1224
1342
  {
@@ -1505,6 +1623,54 @@
1505
1623
  "docs": "Sets the quality of video for recording.\nOptions: 'low', 'medium', 'high'",
1506
1624
  "complexTypes": [],
1507
1625
  "type": "'low' | 'medium' | 'high' | undefined"
1626
+ },
1627
+ {
1628
+ "name": "barcodeScanner",
1629
+ "tags": [
1630
+ {
1631
+ "text": "android, ios, web",
1632
+ "name": "platform"
1633
+ },
1634
+ {
1635
+ "text": "8.8.0",
1636
+ "name": "since"
1637
+ }
1638
+ ],
1639
+ "docs": "Starts barcode scanning together with the camera preview.\nSet to `true` or pass options to scan all supported formats.\nOmit this option to keep barcode scanning disabled at startup.",
1640
+ "complexTypes": [
1641
+ "BarcodeScannerOptions"
1642
+ ],
1643
+ "type": "boolean | BarcodeScannerOptions | undefined"
1644
+ }
1645
+ ]
1646
+ },
1647
+ {
1648
+ "name": "BarcodeScannerOptions",
1649
+ "slug": "barcodescanneroptions",
1650
+ "docs": "",
1651
+ "tags": [],
1652
+ "methods": [],
1653
+ "properties": [
1654
+ {
1655
+ "name": "formats",
1656
+ "tags": [],
1657
+ "docs": "Restricts detection to the given formats. Leaving this empty scans all supported formats.\nRestricting formats can improve scanning speed.",
1658
+ "complexTypes": [
1659
+ "BarcodeScannerFormat"
1660
+ ],
1661
+ "type": "BarcodeScannerFormat[] | undefined"
1662
+ },
1663
+ {
1664
+ "name": "detectionInterval",
1665
+ "tags": [
1666
+ {
1667
+ "text": "500",
1668
+ "name": "default"
1669
+ }
1670
+ ],
1671
+ "docs": "Minimum delay between native scan attempts in milliseconds.\nLower values scan more often but use more CPU.",
1672
+ "complexTypes": [],
1673
+ "type": "number | undefined"
1508
1674
  }
1509
1675
  ]
1510
1676
  },
@@ -1987,6 +2153,79 @@
1987
2153
  }
1988
2154
  ]
1989
2155
  },
2156
+ {
2157
+ "name": "BarcodeScannedEvent",
2158
+ "slug": "barcodescannedevent",
2159
+ "docs": "",
2160
+ "tags": [],
2161
+ "methods": [],
2162
+ "properties": [
2163
+ {
2164
+ "name": "barcodes",
2165
+ "tags": [],
2166
+ "docs": "Barcodes decoded from the current frame.",
2167
+ "complexTypes": [
2168
+ "BarcodeScanResult"
2169
+ ],
2170
+ "type": "BarcodeScanResult[]"
2171
+ }
2172
+ ]
2173
+ },
2174
+ {
2175
+ "name": "BarcodeScanResult",
2176
+ "slug": "barcodescanresult",
2177
+ "docs": "",
2178
+ "tags": [],
2179
+ "methods": [],
2180
+ "properties": [
2181
+ {
2182
+ "name": "value",
2183
+ "tags": [],
2184
+ "docs": "Decoded barcode value.",
2185
+ "complexTypes": [],
2186
+ "type": "string"
2187
+ },
2188
+ {
2189
+ "name": "format",
2190
+ "tags": [],
2191
+ "docs": "Barcode format.",
2192
+ "complexTypes": [
2193
+ "BarcodeFormat"
2194
+ ],
2195
+ "type": "BarcodeFormat"
2196
+ },
2197
+ {
2198
+ "name": "displayValue",
2199
+ "tags": [],
2200
+ "docs": "Human-readable value when the platform exposes one.",
2201
+ "complexTypes": [],
2202
+ "type": "string | undefined"
2203
+ },
2204
+ {
2205
+ "name": "rawBytes",
2206
+ "tags": [],
2207
+ "docs": "Base64-encoded raw bytes when the platform exposes them.",
2208
+ "complexTypes": [],
2209
+ "type": "string | undefined"
2210
+ }
2211
+ ]
2212
+ },
2213
+ {
2214
+ "name": "BarcodeScanErrorEvent",
2215
+ "slug": "barcodescanerrorevent",
2216
+ "docs": "",
2217
+ "tags": [],
2218
+ "methods": [],
2219
+ "properties": [
2220
+ {
2221
+ "name": "message",
2222
+ "tags": [],
2223
+ "docs": "Native scanner error message.",
2224
+ "complexTypes": [],
2225
+ "type": "string"
2226
+ }
2227
+ ]
2228
+ },
1990
2229
  {
1991
2230
  "name": "SafeAreaInsets",
1992
2231
  "slug": "safeareainsets",
@@ -2062,6 +2301,25 @@
2062
2301
  }
2063
2302
  ],
2064
2303
  "typeAliases": [
2304
+ {
2305
+ "name": "CameraPreviewAspectRatio",
2306
+ "slug": "camerapreviewaspectratio",
2307
+ "docs": "",
2308
+ "types": [
2309
+ {
2310
+ "text": "'4:3'",
2311
+ "complexTypes": []
2312
+ },
2313
+ {
2314
+ "text": "'16:9'",
2315
+ "complexTypes": []
2316
+ },
2317
+ {
2318
+ "text": "'fill'",
2319
+ "complexTypes": []
2320
+ }
2321
+ ]
2322
+ },
2065
2323
  {
2066
2324
  "name": "GridMode",
2067
2325
  "slug": "gridmode",
@@ -2115,6 +2373,65 @@
2115
2373
  }
2116
2374
  ]
2117
2375
  },
2376
+ {
2377
+ "name": "BarcodeScannerFormat",
2378
+ "slug": "barcodescannerformat",
2379
+ "docs": "",
2380
+ "types": [
2381
+ {
2382
+ "text": "'aztec'",
2383
+ "complexTypes": []
2384
+ },
2385
+ {
2386
+ "text": "'codabar'",
2387
+ "complexTypes": []
2388
+ },
2389
+ {
2390
+ "text": "'code_39'",
2391
+ "complexTypes": []
2392
+ },
2393
+ {
2394
+ "text": "'code_93'",
2395
+ "complexTypes": []
2396
+ },
2397
+ {
2398
+ "text": "'code_128'",
2399
+ "complexTypes": []
2400
+ },
2401
+ {
2402
+ "text": "'data_matrix'",
2403
+ "complexTypes": []
2404
+ },
2405
+ {
2406
+ "text": "'ean_8'",
2407
+ "complexTypes": []
2408
+ },
2409
+ {
2410
+ "text": "'ean_13'",
2411
+ "complexTypes": []
2412
+ },
2413
+ {
2414
+ "text": "'itf'",
2415
+ "complexTypes": []
2416
+ },
2417
+ {
2418
+ "text": "'pdf417'",
2419
+ "complexTypes": []
2420
+ },
2421
+ {
2422
+ "text": "'qr_code'",
2423
+ "complexTypes": []
2424
+ },
2425
+ {
2426
+ "text": "'upc_a'",
2427
+ "complexTypes": []
2428
+ },
2429
+ {
2430
+ "text": "'upc_e'",
2431
+ "complexTypes": []
2432
+ }
2433
+ ]
2434
+ },
2118
2435
  {
2119
2436
  "name": "PictureFormat",
2120
2437
  "slug": "pictureformat",
@@ -2231,6 +2548,23 @@
2231
2548
  }
2232
2549
  ]
2233
2550
  },
2551
+ {
2552
+ "name": "BarcodeFormat",
2553
+ "slug": "barcodeformat",
2554
+ "docs": "",
2555
+ "types": [
2556
+ {
2557
+ "text": "BarcodeScannerFormat",
2558
+ "complexTypes": [
2559
+ "BarcodeScannerFormat"
2560
+ ]
2561
+ },
2562
+ {
2563
+ "text": "'unknown'",
2564
+ "complexTypes": []
2565
+ }
2566
+ ]
2567
+ },
2234
2568
  {
2235
2569
  "name": "ExposureMode",
2236
2570
  "slug": "exposuremode",
@@ -3,6 +3,40 @@ export type CameraPosition = 'rear' | 'front';
3
3
  export type FlashMode = CameraPreviewFlashMode;
4
4
  export type GridMode = 'none' | '3x3' | '4x4';
5
5
  export type CameraPositioning = 'center' | 'top' | 'bottom';
6
+ export type CameraPreviewAspectRatio = '4:3' | '16:9' | 'fill';
7
+ export type BarcodeScannerFormat = 'aztec' | 'codabar' | 'code_39' | 'code_93' | 'code_128' | 'data_matrix' | 'ean_8' | 'ean_13' | 'itf' | 'pdf417' | 'qr_code' | 'upc_a' | 'upc_e';
8
+ export type BarcodeFormat = BarcodeScannerFormat | 'unknown';
9
+ export interface BarcodeScannerOptions {
10
+ /**
11
+ * Restricts detection to the given formats. Leaving this empty scans all supported formats.
12
+ * Restricting formats can improve scanning speed.
13
+ */
14
+ formats?: BarcodeScannerFormat[];
15
+ /**
16
+ * Minimum delay between native scan attempts in milliseconds.
17
+ * Lower values scan more often but use more CPU.
18
+ * @default 500
19
+ */
20
+ detectionInterval?: number;
21
+ }
22
+ export interface BarcodeScanResult {
23
+ /** Decoded barcode value. */
24
+ value: string;
25
+ /** Barcode format. */
26
+ format: BarcodeFormat;
27
+ /** Human-readable value when the platform exposes one. */
28
+ displayValue?: string;
29
+ /** Base64-encoded raw bytes when the platform exposes them. */
30
+ rawBytes?: string;
31
+ }
32
+ export interface BarcodeScannedEvent {
33
+ /** Barcodes decoded from the current frame. */
34
+ barcodes: BarcodeScanResult[];
35
+ }
36
+ export interface BarcodeScanErrorEvent {
37
+ /** Native scanner error message. */
38
+ message: string;
39
+ }
6
40
  export interface CameraPermissionStatus {
7
41
  camera: PermissionState;
8
42
  microphone?: PermissionState;
@@ -114,7 +148,7 @@ export interface CameraPreviewOptions {
114
148
  *
115
149
  * @since 2.0.0
116
150
  */
117
- aspectRatio?: '4:3' | '16:9';
151
+ aspectRatio?: CameraPreviewAspectRatio;
118
152
  /**
119
153
  * Controls how the camera preview fills the available space.
120
154
  * - 'contain': Fits the entire preview within the space, may show letterboxing (default).
@@ -131,7 +165,7 @@ export interface CameraPreviewOptions {
131
165
  gridMode?: GridMode;
132
166
  /**
133
167
  * Adjusts the y-position to account for safe areas (e.g., notches).
134
- * @platform ios
168
+ * @platform android, ios
135
169
  * @default false
136
170
  */
137
171
  includeSafeAreaInsets?: boolean;
@@ -242,6 +276,14 @@ export interface CameraPreviewOptions {
242
276
  * @default "high"
243
277
  */
244
278
  videoQuality?: 'low' | 'medium' | 'high';
279
+ /**
280
+ * Starts barcode scanning together with the camera preview.
281
+ * Set to `true` or pass options to scan all supported formats.
282
+ * Omit this option to keep barcode scanning disabled at startup.
283
+ * @platform android, ios, web
284
+ * @since 8.8.0
285
+ */
286
+ barcodeScanner?: boolean | BarcodeScannerOptions;
245
287
  }
246
288
  /**
247
289
  * Defines the options for capturing a picture.
@@ -431,6 +473,26 @@ export interface CameraPreviewPlugin {
431
473
  captureSample(options: CameraSampleOptions): Promise<{
432
474
  value: string;
433
475
  }>;
476
+ /**
477
+ * Starts barcode scanning on the active camera preview.
478
+ *
479
+ * The scanner reuses the current camera session and emits `barcodeScanned` events.
480
+ * Call `stopBarcodeScanner()` when scanning is no longer needed.
481
+ *
482
+ * Android uses the lightweight Google Play Services ML Kit model. If the model is not installed yet,
483
+ * first scans may return no result until Google Play Services finishes downloading it.
484
+ *
485
+ * @since 8.8.0
486
+ * @platform android, ios, web
487
+ */
488
+ startBarcodeScanner(options?: BarcodeScannerOptions): Promise<void>;
489
+ /**
490
+ * Stops barcode scanning while keeping the camera preview running.
491
+ *
492
+ * @since 8.8.0
493
+ * @platform android, ios, web
494
+ */
495
+ stopBarcodeScanner(): Promise<void>;
434
496
  /**
435
497
  * Gets the flash modes supported by the active camera.
436
498
  *
@@ -443,8 +505,8 @@ export interface CameraPreviewPlugin {
443
505
  /**
444
506
  * Set the aspect ratio of the camera preview.
445
507
  *
446
- * @param {{ aspectRatio: '4:3' | '16:9'; x?: number; y?: number }} options - The desired aspect ratio and optional position.
447
- * - aspectRatio: The desired aspect ratio ('4:3' or '16:9')
508
+ * @param {{ aspectRatio: CameraPreviewAspectRatio; x?: number; y?: number }} options - The desired aspect ratio and optional position.
509
+ * - aspectRatio: The desired aspect ratio ('4:3', '16:9', or 'fill')
448
510
  * - x: Optional x coordinate for positioning. If not provided, view will be auto-centered horizontally.
449
511
  * - y: Optional y coordinate for positioning. If not provided, view will be auto-centered vertically.
450
512
  * @returns {Promise<{ width: number; height: number; x: number; y: number }>} A promise that resolves with the actual preview dimensions and position.
@@ -452,7 +514,7 @@ export interface CameraPreviewPlugin {
452
514
  * @platform android, ios
453
515
  */
454
516
  setAspectRatio(options: {
455
- aspectRatio: '4:3' | '16:9';
517
+ aspectRatio: CameraPreviewAspectRatio;
456
518
  x?: number;
457
519
  y?: number;
458
520
  }): Promise<{
@@ -464,12 +526,12 @@ export interface CameraPreviewPlugin {
464
526
  /**
465
527
  * Gets the current aspect ratio of the camera preview.
466
528
  *
467
- * @returns {Promise<{ aspectRatio: '4:3' | '16:9' }>} A promise that resolves with the current aspect ratio.
529
+ * @returns {Promise<{ aspectRatio: CameraPreviewAspectRatio }>} A promise that resolves with the current aspect ratio.
468
530
  * @since 7.5.0
469
531
  * @platform android, ios
470
532
  */
471
533
  getAspectRatio(): Promise<{
472
- aspectRatio: '4:3' | '16:9';
534
+ aspectRatio: CameraPreviewAspectRatio;
473
535
  }>;
474
536
  /**
475
537
  * Sets the grid mode of the camera preview overlay.
@@ -736,6 +798,20 @@ export interface CameraPreviewPlugin {
736
798
  addListener(eventName: 'orientationChange', listenerFunc: (data: {
737
799
  orientation: DeviceOrientation;
738
800
  }) => void): Promise<PluginListenerHandle>;
801
+ /**
802
+ * Adds a listener for barcode scan results.
803
+ *
804
+ * @since 8.8.0
805
+ * @platform android, ios, web
806
+ */
807
+ addListener(eventName: 'barcodeScanned', listenerFunc: (data: BarcodeScannedEvent) => void): Promise<PluginListenerHandle>;
808
+ /**
809
+ * Adds a listener for non-fatal barcode scanner errors.
810
+ *
811
+ * @since 8.8.0
812
+ * @platform android, web
813
+ */
814
+ addListener(eventName: 'barcodeScanError', listenerFunc: (data: BarcodeScanErrorEvent) => void): Promise<PluginListenerHandle>;
739
815
  /**
740
816
  * Deletes a file at the given absolute path on the device.
741
817
  * Use this to quickly clean up temporary images created with `storeToFile`.