Skip to content

Commit d4939b5

Browse files
docs: Update plugins v7 and v8 (#461)
1 parent 08162d6 commit d4939b5

File tree

7 files changed

+321
-37
lines changed

7 files changed

+321
-37
lines changed

docs/apis/background-runner.md

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ Visit [Don't kill my app!](https://dontkillmyapp.com) for more information on th
277277

278278
## Limitations of Background Tasks
279279

280-
Its not possible to run persistent, always running background services on mobile operating systems. Due to the limitations imposed by iOS and Android designed to reduce battery and data consumption, background tasks are constrained with various limitations that you must keep in mind while designing and implementing your background task.
280+
It's not possible to run persistent, always running background services on mobile operating systems. Due to the limitations imposed by iOS and Android designed to reduce battery and data consumption, background tasks are constrained with various limitations that you must keep in mind while designing and implementing your background task.
281281

282282
### iOS
283283

@@ -297,6 +297,8 @@ It’s not possible to run persistent, always running background services on mob
297297
* [`checkPermissions()`](#checkpermissions)
298298
* [`requestPermissions(...)`](#requestpermissions)
299299
* [`dispatchEvent(...)`](#dispatchevent)
300+
* [`addListener('backgroundRunnerNotificationReceived', ...)`](#addlistenerbackgroundrunnernotificationreceived-)
301+
* [`removeNotificationListeners()`](#removenotificationlisteners)
300302
* [Interfaces](#interfaces)
301303
* [Type Aliases](#type-aliases)
302304

@@ -358,6 +360,41 @@ Dispatches an event to the configured runner.
358360
--------------------
359361

360362

363+
### addListener('backgroundRunnerNotificationReceived', ...)
364+
365+
```typescript
366+
addListener(eventName: 'backgroundRunnerNotificationReceived', listenerFunc: (event: NotificationActionEvent) => void) => any
367+
```
368+
369+
Add a listener for notification actions.
370+
371+
| Param | Type |
372+
| ------------------ | ----------------------------------------------------------------------------------------------- |
373+
| **`eventName`** | <code>'backgroundRunnerNotificationReceived'</code> |
374+
| **`listenerFunc`** | <code>(event: <a href="#notificationactionevent">NotificationActionEvent</a>) =&gt; void</code> |
375+
376+
**Returns:** <code>any</code>
377+
378+
**Since:** 2.1.1
379+
380+
--------------------
381+
382+
383+
### removeNotificationListeners()
384+
385+
```typescript
386+
removeNotificationListeners() => any
387+
```
388+
389+
Remove notification action listeners for this plugin.
390+
391+
**Returns:** <code>any</code>
392+
393+
**Since:** 2.1.1
394+
395+
--------------------
396+
397+
361398
### Interfaces
362399

363400

@@ -385,6 +422,21 @@ Dispatches an event to the configured runner.
385422
| **`details`** | <code>{ [key: string]: any; }</code> | | |
386423

387424

425+
#### NotificationActionEvent
426+
427+
| Prop | Type |
428+
| -------------------- | ------------------- |
429+
| **`actionTypeId`** | <code>string</code> |
430+
| **`notificationId`** | <code>number</code> |
431+
432+
433+
#### PluginListenerHandle
434+
435+
| Prop | Type |
436+
| ------------ | ------------------------- |
437+
| **`remove`** | <code>() =&gt; any</code> |
438+
439+
388440
### Type Aliases
389441

390442

docs/apis/barcode-scanner.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ ext {
2727
}
2828
```
2929

30-
Note: Android with `ZXING` scanning library supports all formats, while `MLKIT` supports all but `MAXICODE`, `RSS_14`, `RSS_EXPANDED` and `UPC_EAN_EXTENSION` - using one of these in `hint` will default to scanning any format.
30+
Note: Android with `ZXING` scanning library supports all formats, while `MLKIT` supports all except `MAXICODE`, `RSS_14`, `RSS_EXPANDED` and `UPC_EAN_EXTENSION` - using one of these in `hint` will default to scanning any format.
3131

3232
#### iOS
3333

3434
The barcode scanner uses the camera on the device. Ensure you configure the Privacy - Camera Usage Description in your Info.plist file so that your application can access the device's camera.
3535

36-
Note: iOS supports all formats but `MAXICODE` and `UPC_EAN_EXTENSION` - using them in `hint` will default to scanning any format. Also, Apple Vision does not distinguish between `UPC_A` and `EAN_13`, so specifying one of these in `hint` will allow to scan both.
36+
Note: iOS supports all formats except `MAXICODE` and `UPC_EAN_EXTENSION` - using them in `hint` will default to scanning any format. Also, Apple Vision does not distinguish between `UPC_A` and `EAN_13`, so specifying one of these in `hint` will allow to scan both.
3737

3838
---
3939

0 commit comments

Comments
 (0)