-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jonas
committed
Mar 20, 2017
1 parent
3d2a29c
commit 07485bd
Showing
6 changed files
with
214 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "anyline-ocr-react-native-module", | ||
"displayName": "anyline-ocr-react-native-module" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ( | ||
<View style={styles.container}> | ||
<Button style={styles.buttons} title={'Open Energy Analog Meter Scanner'} color="#0099FF" | ||
onPress={()=> {platformPermissionCheck('ANALOG_METER')}}/> | ||
|
||
<Button style={styles.buttons} title={'Open Energy Digital Meter Scanner'} color="#0099FF" | ||
onPress={()=> {platformPermissionCheck('DIGITAL_METER')}}/> | ||
|
||
<Button style={styles.buttons} title={'Open Barcode Scanner'} color="#0099FF" | ||
onPress={()=> {platformPermissionCheck('BARCODE')}}/> | ||
|
||
<Button style={styles.buttons} title={'Open MRZ Scanner'} color="#0099FF" | ||
onPress={()=> {platformPermissionCheck('MRZ')}}/> | ||
|
||
<Button style={styles.buttons} title={'Open Document Snapper'} color="#0099FF" | ||
onPress={()=> {platformPermissionCheck('DOCUMENT')}}/> | ||
</View> | ||
); | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
justifyContent: 'space-around', | ||
backgroundColor: '#303030', | ||
marginTop: '40%', | ||
marginBottom: '20%' | ||
}, | ||
buttons: { | ||
fontSize : 40, | ||
backgroundColor: '#0099FF', | ||
width: "100%", | ||
height: "20%" | ||
} | ||
}); |