diff --git a/example/Anyline/app.json b/example/Anyline/app.json new file mode 100644 index 00000000..1bbfdd15 --- /dev/null +++ b/example/Anyline/app.json @@ -0,0 +1,4 @@ +{ + "name": "anyline-ocr-react-native-module", + "displayName": "anyline-ocr-react-native-module" +} \ No newline at end of file diff --git a/example/Anyline/config/BarcodeConfig.js b/example/Anyline/config/BarcodeConfig.js new file mode 100644 index 00000000..53f2a8c3 --- /dev/null +++ b/example/Anyline/config/BarcodeConfig.js @@ -0,0 +1,46 @@ +export default { + license: 'eyAiYW5kcm9pZElkZW50aWZpZXIiOiBbICJjb20uYW55bGluZSIgXSwgImRlYnVn\nUmVwb3J0aW5nIjogIm9uIiwgImlvc0lkZW50aWZpZXIiOiBbICJjb20uYW55bGlu\nZSIgXSwgImxpY2Vuc2VLZXlWZXJzaW9uIjogMiwgIm1ham9yVmVyc2lvbiI6ICIz\nIiwgInBpbmdSZXBvcnRpbmciOiB0cnVlLCAicGxhdGZvcm0iOiBbICJBbmRyb2lk\nIiwgImlPUyIgXSwgInNjb3BlIjogWyAiQUxMIiBdLCAic2hvd1dhdGVybWFyayI6\nIHRydWUsICJ0b2xlcmFuY2VEYXlzIjogMywgInZhbGlkIjogIjIwMTctMTItMzEi\nIH0KcGNRSXBOU0MzdGZ5QVV1RkRtSEMyMGo0TElXSGVTMnNxRmJybllqOWZDOWZm\nS1ZpaWVGSitLUGZGY2tTWm9YUgpMVmZvWGx2QmZDOVVaaUErZzZtTGNTV3owUVVl\nSkVuRHBGcWJVU0cxVGVBN1NJenR2aU9BOGg2bFlnNXFSZmw0CjQ5d0IvNXVtL2Ir\nUDhHaXRLUzMzaFNacVhTbEdjbnkxYUVRaWxCRjFHL2NCeitIcUFtUEFMaVpBVzFQ\nZDkxdDYKZXZTcU1XdkNtMk01blZUaVNDd2dDZnR6Zkg3WENnQlVCU2hOb2ZoWlFJ\nVCtiUE5ycTE3SGg1YkVWa2ZoUlZBSQpSc0d1YlM4SEpvVlAvaEs5a2FMdzliRWYx\nZXpYZVpVOXFUbCswSXZKUy9lSlBrazJmV0IxcS9CUzM4ZFBVOTZHClpqVXIyRmlQ\nRjNSc1FxRC9UU244Q0E9PQo=', + options: { + "captureResolution": "720p", + + "cutout": { + "style": "rect", + "maxWidthPercent": "80%", + "maxHeightPercent": "80%", + "alignment": "center", + "ratioFromSize": { + "width": 100, + "height": 80 + }, + "strokeWidth": 1, + "cornerRadius": 3, + "strokeColor": "FFFFFF", + "outerColor": "000000", + "outerAlpha": 0.3 + }, + "flash": { + "mode": "auto", + "alignment": "bottom_right" + }, + "beepOnResult": true, + "vibrateOnResult": true, + "blinkAnimationOnResult": true, + "cancelOnResult": false, + "doneButton": { // iOS only. Android uses hardware back button. + "title": "OK", + "type": "rect", // fullwidth, rect + "cornerRadius": 0, + //"backgroundColor":"#EEEEEE", // default clearcolor + "textColor": "FFFFFF", + "textColorHighlighted": "CCCCCC", + "fontSize": 33, + "fontName": "HelveticaNeue", + "positionXAlignment": "center", // left,right,center - no affect on fullwidth + "positionYAlignment": "bottom", // top, center, bottom + "offset": { + "x": 0, // postive -> right + "y": -88, // postive -> down + } + } + } +} diff --git a/example/Anyline/config/DocumentConfig.js b/example/Anyline/config/DocumentConfig.js new file mode 100644 index 00000000..d17b2628 --- /dev/null +++ b/example/Anyline/config/DocumentConfig.js @@ -0,0 +1,39 @@ +export default { + license: 'eyAiYW5kcm9pZElkZW50aWZpZXIiOiBbICJjb20uYW55bGluZSIgXSwgImRlYnVn\nUmVwb3J0aW5nIjogIm9uIiwgImlvc0lkZW50aWZpZXIiOiBbICJjb20uYW55bGlu\nZSIgXSwgImxpY2Vuc2VLZXlWZXJzaW9uIjogMiwgIm1ham9yVmVyc2lvbiI6ICIz\nIiwgInBpbmdSZXBvcnRpbmciOiB0cnVlLCAicGxhdGZvcm0iOiBbICJBbmRyb2lk\nIiwgImlPUyIgXSwgInNjb3BlIjogWyAiQUxMIiBdLCAic2hvd1dhdGVybWFyayI6\nIHRydWUsICJ0b2xlcmFuY2VEYXlzIjogMywgInZhbGlkIjogIjIwMTctMTItMzEi\nIH0KcGNRSXBOU0MzdGZ5QVV1RkRtSEMyMGo0TElXSGVTMnNxRmJybllqOWZDOWZm\nS1ZpaWVGSitLUGZGY2tTWm9YUgpMVmZvWGx2QmZDOVVaaUErZzZtTGNTV3owUVVl\nSkVuRHBGcWJVU0cxVGVBN1NJenR2aU9BOGg2bFlnNXFSZmw0CjQ5d0IvNXVtL2Ir\nUDhHaXRLUzMzaFNacVhTbEdjbnkxYUVRaWxCRjFHL2NCeitIcUFtUEFMaVpBVzFQ\nZDkxdDYKZXZTcU1XdkNtMk01blZUaVNDd2dDZnR6Zkg3WENnQlVCU2hOb2ZoWlFJ\nVCtiUE5ycTE3SGg1YkVWa2ZoUlZBSQpSc0d1YlM4SEpvVlAvaEs5a2FMdzliRWYx\nZXpYZVpVOXFUbCswSXZKUy9lSlBrazJmV0IxcS9CUzM4ZFBVOTZHClpqVXIyRmlQ\nRjNSc1FxRC9UU244Q0E9PQo=', + options: { + "captureResolution":"720p", + "pictureResolution":"1080p", + "cutout": { + "style": "rect", + "maxWidthPercent": "100%", + "maxHeightPercent": "100%", + "width": 720, + "ratioFromSize": { + "width": 10, + "height": 15 + }, + "alignment": "center", + "strokeWidth": 2, + "cornerRadius": 0, + "strokeColor": "00000000" + }, + "flash": { + "mode": "manual", + "alignment": "bottom_left", + "offset": { + "x": 10, + "y": 0 + } + }, + "visualFeedback" : { + "style": "RECT", + "strokeColor": "300099FF", + "animationDuration": 150, + "cornerRadius": 2 + }, + "beepOnResult": true, + "vibrateOnResult": true, + "blinkAnimationOnResult": true, + "cancelOnResult": true + } +} diff --git a/example/Anyline/config/EnergyConfig.js b/example/Anyline/config/EnergyConfig.js new file mode 100644 index 00000000..ef603849 --- /dev/null +++ b/example/Anyline/config/EnergyConfig.js @@ -0,0 +1,49 @@ +export default { + license: 'eyAiYW5kcm9pZElkZW50aWZpZXIiOiBbICJjb20uYW55bGluZSIgXSwgImRlYnVn\nUmVwb3J0aW5nIjogIm9uIiwgImlvc0lkZW50aWZpZXIiOiBbICJjb20uYW55bGlu\nZSIgXSwgImxpY2Vuc2VLZXlWZXJzaW9uIjogMiwgIm1ham9yVmVyc2lvbiI6ICIz\nIiwgInBpbmdSZXBvcnRpbmciOiB0cnVlLCAicGxhdGZvcm0iOiBbICJBbmRyb2lk\nIiwgImlPUyIgXSwgInNjb3BlIjogWyAiQUxMIiBdLCAic2hvd1dhdGVybWFyayI6\nIHRydWUsICJ0b2xlcmFuY2VEYXlzIjogMywgInZhbGlkIjogIjIwMTctMTItMzEi\nIH0KcGNRSXBOU0MzdGZ5QVV1RkRtSEMyMGo0TElXSGVTMnNxRmJybllqOWZDOWZm\nS1ZpaWVGSitLUGZGY2tTWm9YUgpMVmZvWGx2QmZDOVVaaUErZzZtTGNTV3owUVVl\nSkVuRHBGcWJVU0cxVGVBN1NJenR2aU9BOGg2bFlnNXFSZmw0CjQ5d0IvNXVtL2Ir\nUDhHaXRLUzMzaFNacVhTbEdjbnkxYUVRaWxCRjFHL2NCeitIcUFtUEFMaVpBVzFQ\nZDkxdDYKZXZTcU1XdkNtMk01blZUaVNDd2dDZnR6Zkg3WENnQlVCU2hOb2ZoWlFJ\nVCtiUE5ycTE3SGg1YkVWa2ZoUlZBSQpSc0d1YlM4SEpvVlAvaEs5a2FMdzliRWYx\nZXpYZVpVOXFUbCswSXZKUy9lSlBrazJmV0IxcS9CUzM4ZFBVOTZHClpqVXIyRmlQ\nRjNSc1FxRC9UU244Q0E9PQo=', + options: { + captureResolution: '720p', + cutout: { + style: 'rect', + alignment: 'top', + offset: { + 'x': 0, + 'y': 120, + }, + strokeWidth: 2, + cornerRadius: 4, + strokeColor: 'F21C0A', + outerColor: '000000', + outerAlpha: 0.3, + }, + flash: { + mode: 'manual', + alignment: 'bottom_right', + }, + beepOnResult: true, + vibrateOnResult: true, + blinkAnimationOnResult: true, + cancelOnResult: true, + reportingEnabled: true, + visualFeedback: { + style: 'rect', + strokeColor: 'F21C0A', + fillColor: '22F21C0A', + cornerRadius: 2, + }, + segment: { + titles: [ + 'Analog', + 'Digital' + ], + modes: [ + 'ANALOG_METER', + 'DIGITAL_METER' + ], + tintColor: 'F21C0A', + offset: { + x: 0, + y: 600 + } + } + } +} diff --git a/example/Anyline/config/MRZConfig.js b/example/Anyline/config/MRZConfig.js new file mode 100644 index 00000000..933c041c --- /dev/null +++ b/example/Anyline/config/MRZConfig.js @@ -0,0 +1,26 @@ +export default { + license: 'eyAiYW5kcm9pZElkZW50aWZpZXIiOiBbICJjb20uYW55bGluZSIgXSwgImRlYnVn\nUmVwb3J0aW5nIjogIm9uIiwgImlvc0lkZW50aWZpZXIiOiBbICJjb20uYW55bGlu\nZSIgXSwgImxpY2Vuc2VLZXlWZXJzaW9uIjogMiwgIm1ham9yVmVyc2lvbiI6ICIz\nIiwgInBpbmdSZXBvcnRpbmciOiB0cnVlLCAicGxhdGZvcm0iOiBbICJBbmRyb2lk\nIiwgImlPUyIgXSwgInNjb3BlIjogWyAiQUxMIiBdLCAic2hvd1dhdGVybWFyayI6\nIHRydWUsICJ0b2xlcmFuY2VEYXlzIjogMywgInZhbGlkIjogIjIwMTctMTItMzEi\nIH0KcGNRSXBOU0MzdGZ5QVV1RkRtSEMyMGo0TElXSGVTMnNxRmJybllqOWZDOWZm\nS1ZpaWVGSitLUGZGY2tTWm9YUgpMVmZvWGx2QmZDOVVaaUErZzZtTGNTV3owUVVl\nSkVuRHBGcWJVU0cxVGVBN1NJenR2aU9BOGg2bFlnNXFSZmw0CjQ5d0IvNXVtL2Ir\nUDhHaXRLUzMzaFNacVhTbEdjbnkxYUVRaWxCRjFHL2NCeitIcUFtUEFMaVpBVzFQ\nZDkxdDYKZXZTcU1XdkNtMk01blZUaVNDd2dDZnR6Zkg3WENnQlVCU2hOb2ZoWlFJ\nVCtiUE5ycTE3SGg1YkVWa2ZoUlZBSQpSc0d1YlM4SEpvVlAvaEs5a2FMdzliRWYx\nZXpYZVpVOXFUbCswSXZKUy9lSlBrazJmV0IxcS9CUzM4ZFBVOTZHClpqVXIyRmlQ\nRjNSc1FxRC9UU244Q0E9PQo=', + options: { + "captureResolution": "1080p", + + "cutout": { + "style": "rect", + "maxWidthPercent": "90%", + "maxHeightPercent": "90%", + "alignment": "top_half", + "strokeWidth": 2, + "cornerRadius": 4, + "strokeColor": "FFFFFF", + "outerColor": "000000", + "outerAlpha": 0.3 + }, + "flash": { + "mode": "manual", + "alignment": "bottom_right" + }, + "beepOnResult": true, + "vibrateOnResult": true, + "blinkAnimationOnResult": true, + "cancelOnResult": true + } +} diff --git a/example/Anyline/src/Overview.js b/example/Anyline/src/Overview.js new file mode 100644 index 00000000..86377905 --- /dev/null +++ b/example/Anyline/src/Overview.js @@ -0,0 +1,50 @@ +/** + * Created by jonesBoi on 14.03.17. + */ +import React from 'react'; +import {Button, View, StyleSheet, Platform} from 'react-native'; + +export default function Overview({ + openAnyline, + checkCameraPermissionAndOpen +}) { + + + const platformPermissionCheck = (Platform.OS === 'android') ? checkCameraPermissionAndOpen : openAnyline; + + + return ( + +