Skip to content

Commit

Permalink
added new ReadMe
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaslaux committed Nov 15, 2018
1 parent ff6aaf8 commit 958cb11
Showing 1 changed file with 12 additions and 27 deletions.
39 changes: 12 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
The plugin lets you connect to the SDK with React-Native.


## Update to >= 5.0

If you use this plugin with a equal or greater version then 5.0, you can use our new Anyline structure, which will provide the whole
configuration of every SDK Feature through the config file. If you use the the 'scan' call in your Javascript files, you have to
use a new config style.
The old calls with the old configurations will still work.


## Requirements:

### iOS
Expand Down Expand Up @@ -161,7 +169,7 @@ If you want to get detailed information on the config JSON, go to our[`documenta
```
AnylineOCR.setup(
JSON.stringify(config),
“ANALOG_METER”,
"scan",
this.onResult,
this.onError
);
Expand All @@ -173,7 +181,7 @@ openAnyline = async () => {
...
try {
const result = await AnylineOCR.setupPromise(JSON.stringify(config), “ANALOG_METER”);
const result = await AnylineOCR.setupPromise(JSON.stringify(config), "scan");
} catch(error) {
console.error(error);
}
Expand All @@ -186,7 +194,7 @@ openAnyline = async () => {
```
AnylineOCR.setupScanViewWithConfigJson(
JSON.stringify(config),
“ANALOG_METER”,
"scan”,
this.onResult,
this.onError
);
Expand Down Expand Up @@ -223,37 +231,14 @@ android
| Key | Type | Default | Description |
| --- | --- | --- | --- |
| config | string | \*required | config (JSON String)|
| scanMode | string | \*required | Will set the scanMode/Module of the Plugin. |
| scanMode | string | \*required | In the new Version, this is always 'scan', and the scanMode is declared through the configuration |
| onResult | function | \*required | The function you pass will be the onResult callback. Use this callback to handle the found scan results. |
| onError | function | \*required | The onError function will be called when the AnylinePlugin encounters an error. Handle the error messages in this method. |

### config
Stringified JSON with all the configurations, detailed information [here](https://documentation.anyline.io/toc/view_configuration/index.html).

Keep in mind, that you have to add every permission to your project, you add in the config (vibrateOnResult -> vibration permission)
### scanMode
Available settings:

##### Energy Meter
```
"AUTO_ANALOG_DIGITAL_METER"
"ANALOG_METER"
"DIGITAL_METER"
"DIAL_METER"
"HEAT_METER_4"
"HEAT_METER_5"
"HEAT_METER_6"
"SERIAL_NUMBER"
```
##### Other ScanModes
```
"BARCODE"
"MRZ"
"ANYLINE_OCR"
"DOCUMENT"
"LICENSE_PLATE"
```
Get more information in our [Docu](https://documentation.anyline.io/toc/platforms/react-native/getting_started.html#react-native-set-scan-mode).

### onResult Function
Callback -> Stringified JSON
Expand Down

0 comments on commit 958cb11

Please sign in to comment.