docs: add vision-camera-plugin-builder sections in Creating Frame Processor Plugins (#1123)
- add automatic setup section to "Creating Frame Processor Plugins (iOS|Android)" with vision-camera-plugin-builder CLI
This commit is contained in:
parent
724af31807
commit
2a73c09be5
@ -14,6 +14,34 @@ In this guide we will create a custom QR Code Scanner Plugin which can be used f
|
|||||||
|
|
||||||
Android Frame Processor Plugins can be written in either **Java**, **Kotlin** or **C++ (JNI)**.
|
Android Frame Processor Plugins can be written in either **Java**, **Kotlin** or **C++ (JNI)**.
|
||||||
|
|
||||||
|
### Mostly automatic setup
|
||||||
|
|
||||||
|
1. Run [Vision Camera Plugin Builder CLI](https://github.com/mateusz1913/vision-camera-plugin-builder)
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npx vision-camera-plugin-builder android
|
||||||
|
```
|
||||||
|
|
||||||
|
:::info
|
||||||
|
The CLI will ask you for the path to project's Android Manifest file, name of the plugin (e.g. `QRCodeFrameProcessor`), name of the exposed method (e.g. `scanQRCodes`) and language you want to use for plugin development (Java or Kotlin).
|
||||||
|
For reference see the [CLI's docs](https://github.com/mateusz1913/vision-camera-plugin-builder#%EF%B8%8F-options).
|
||||||
|
:::
|
||||||
|
|
||||||
|
2. Register the package in MainApplication.java
|
||||||
|
|
||||||
|
```java {6}
|
||||||
|
@Override
|
||||||
|
protected List<ReactPackage> getPackages() {
|
||||||
|
@SuppressWarnings("UnnecessaryLocalVariable")
|
||||||
|
List<ReactPackage> packages = new PackageList(this).getPackages();
|
||||||
|
...
|
||||||
|
packages.add(new QRCodeFrameProcessorPluginPackage()); // <- add
|
||||||
|
return packages;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Manual setup
|
||||||
|
|
||||||
<Tabs
|
<Tabs
|
||||||
defaultValue="java"
|
defaultValue="java"
|
||||||
values={[
|
values={[
|
||||||
|
@ -14,6 +14,20 @@ In this guide we will create a custom QR Code Scanner Plugin which can be used f
|
|||||||
|
|
||||||
iOS Frame Processor Plugins can be written in either **Objective-C** or **Swift**.
|
iOS Frame Processor Plugins can be written in either **Objective-C** or **Swift**.
|
||||||
|
|
||||||
|
### Automatic setup
|
||||||
|
|
||||||
|
Run [Vision Camera Plugin Builder CLI](https://github.com/mateusz1913/vision-camera-plugin-builder),
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npx vision-camera-plugin-builder ios
|
||||||
|
```
|
||||||
|
|
||||||
|
:::info
|
||||||
|
The CLI will ask you for the path to project's .xcodeproj file, name of the plugin (e.g. `QRCodeFrameProcessor`), name of the exposed method (e.g. `scanQRCodes`) and language you want to use for plugin development (Objective-C, Objective-C++ or Swift).
|
||||||
|
For reference see the [CLI's docs](https://github.com/mateusz1913/vision-camera-plugin-builder#%EF%B8%8F-options).
|
||||||
|
:::
|
||||||
|
|
||||||
|
### Manual setup
|
||||||
|
|
||||||
<Tabs
|
<Tabs
|
||||||
defaultValue="objc"
|
defaultValue="objc"
|
||||||
|
Loading…
Reference in New Issue
Block a user