@anyline/anyline-sdk-react-native
Advanced tools
Comparing version 0.1.0-alpha.1 to 0.2.0-alpha.1
{ | ||
"name": "@anyline/anyline-sdk-react-native", | ||
"version": "0.1.0-alpha.1", | ||
"version": "0.2.0-alpha.1", | ||
"description": "A plugin for connecting Anyline with React-Native", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
# README # | ||
## Requirements | ||
## How to use the SDK ## | ||
#### iOS | ||
Platform >= 12 | ||
#### Android | ||
minSDK >= 21 | ||
## How to use the SDK | ||
#### 0. Set up your development environment | ||
To set up a React Native application please follow the instructions from (reactnative.dev)[https://reactnative.dev/docs/environment-setup]. | ||
To set up a React Native application please follow the instructions from [reactnative.dev](https://reactnative.dev/docs/environment-setup). | ||
#### 1. Add our maven repository to the project level build.gradle | ||
#### 1. Install the Anyline plugin | ||
Install the plugin via npm: | ||
```shell | ||
npm i @anyline/anyline-sdk-react-native | ||
``` | ||
Add the dependency to your project and link the plugin via react-native. | ||
```shell | ||
yarn add @anyline/anyline-sdk-react-native && react-native link | ||
``` | ||
Optionally for **Android**: add the repository to the project level build.gradle. | ||
```groovy | ||
@@ -18,15 +37,10 @@ allprojects { | ||
#### 2. Add Anyline plugin to your project | ||
```shell | ||
yarn add anyline-sdk-react-native && react-native link | ||
``` | ||
#### 3. Import AnylineSdk and ReactScanView | ||
#### 2. Import AnylineSdk and ReactScanView | ||
```js | ||
import { AnylineSdk, ReactScanView } from 'anyline-sdk-react-native'; | ||
import { AnylineSdk, ReactScanView } from '@anyline/anyline-sdk-react-native'; | ||
``` | ||
#### 4. Initialise SDK | ||
Initialise the Anyline SDK in the constructor of the app. | ||
Optionally you can listen to success and error callbacks. | ||
#### 3. Initialise SDK | ||
Initialise the Anyline SDK either with your [Trial License](https://ocr.anyline.com/request/sdk-trial) or with a [Commercial License](https://ocr.anyline.com/contact). | ||
You can optionally listen to success and error callbacks for the initialisation. | ||
@@ -39,8 +53,8 @@ ```js | ||
AnylineSdk.initSdk( | ||
"ewogICJsaWNlbnNlS2V5VmVyc2lvbiI6ICIzLjAiLAogICJkZWJ1Z1JlcG9ydGluZyI6ICJvbiIsCiAgIm1ham9yVmVyc2lvbiI6ICIzNyIsCiAgInNjb3BlIjogWwogICAgIkFMTCIKICBdLAogICJtYXhEYXlzTm90UmVwb3J0ZWQiOiA1LAogICJhZHZhbmNlZEJhcmNvZGUiOiB0cnVlLAogICJtdWx0aUJhcmNvZGUiOiB0cnVlLAogICJzdXBwb3J0ZWRCYXJjb2RlRm9ybWF0cyI6IFsKICAgICJBTEwiCiAgXSwKICAicGxhdGZvcm0iOiBbCiAgICAiaU9TIiwKICAgICJBbmRyb2lkIgogIF0sCiAgInNob3dXYXRlcm1hcmsiOiB0cnVlLAogICJ0b2xlcmFuY2VEYXlzIjogMzAsCiAgInZhbGlkIjogIjIwMjItMTItMzEiLAogICJpb3NJZGVudGlmaWVyIjogWwogICAgImNvbS5ybnBvYyIKICBdLAogICJhbmRyb2lkSWRlbnRpZmllciI6IFsKICAgICJjb20ucm5wb2MiCiAgXQp9CnBPc3VxT0NFS2tSSVJ0UExlUnRiamlpRHVXdkJrNURmVTZvVytHYkEva0x1eVFtT25VNzBENWlkcklNdUtFYVM3Q3lBbG0yZVp4dUJtbEdHQWswM3FzMExQVnZMalJkUDBaSlpOVmZLTjZnb0s5SkdOTStNTy9GaFZEb1U4TWp4QmdORnBDQk9iM0t0QTJNWUdmTTJLZWNVazM0eFc4emh6a2VKVzhwT0EvRjE4QTlvK2U3T09PTzZ6NCtmclZWdzZybkZBT3RkclhpMFI4aDBtMndsWEY4R09QTjJMNktlbURESG9FeG1VaGF3Rm5pLzlON1pSKzFBM0tQR3diRXJzWC9HdUNVandwZGFTcGdDaERoemg3bFVRYmJNb09EajFHRVd6QjdFcEdyU3RpRDk1NGNlUTJzMWIrbTk2bDFzUE9ZeGVaeXdtZENFQnJkK0t0SytPZz09", | ||
"<YOUR LICENSE KEY>", | ||
(error) => { | ||
console.log("Error initialising SDK: " + error); | ||
// handle initialisation error | ||
}, | ||
() => { | ||
console.log("Anyline SDK initialised."); | ||
// handle intialisation success | ||
} | ||
@@ -52,4 +66,4 @@ ); | ||
#### 5. Add ReactScanView to your view hierarchy | ||
Pass the JSON config file and the callback method as an attribute to the `ReactScanView`. | ||
#### 4. Add ReactScanView to your view hierarchy | ||
Pass the JSON config file and the result callback method as an attribute to the `ReactScanView`. | ||
@@ -67,2 +81,3 @@ ```js | ||
You can start the scan process whenever, but you should not forget to stop the process once component is dismounting. | ||
```js | ||
@@ -78,1 +93,12 @@ componentDidMount() { | ||
## Get help | ||
Please raise a support request using the [Anyline Helpdesk](https://anyline.atlassian.net/servicedesk/customer/portal/2/group/6). When raising a support request, please fill out and include the following information: | ||
`Support request concerning Anyline Github Repository: anyline-sdk-react-native` | ||
## License | ||
See LICENSE file. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license
Found 1 instance in 1 package
665260
177
99
1
80