Skip to content

Commit 9813d4b

Browse files
committed
Install react-native-openalpr dependency
1 parent 871676b commit 9813d4b

File tree

5 files changed

+29
-103
lines changed

5 files changed

+29
-103
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,5 @@ buck-out/
3939
\.buckd/
4040
android/app/libs
4141
android/keystores/debug.keystore
42+
43+
react-native-openalpr.tgz

RNOpenALPRExample/App.js

Lines changed: 11 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,23 @@
1-
/**
2-
* Sample React Native App
3-
* https://github.com/facebook/react-native
4-
*
5-
* @format
6-
* @flow
7-
*/
8-
91
import React from 'react';
10-
import {
11-
SafeAreaView,
12-
StyleSheet,
13-
ScrollView,
14-
View,
15-
Text,
16-
StatusBar,
17-
} from 'react-native';
18-
19-
import {
20-
Header,
21-
LearnMoreLinks,
22-
Colors,
23-
DebugInstructions,
24-
ReloadInstructions,
25-
} from 'react-native/Libraries/NewAppScreen';
2+
import {StyleSheet} from 'react-native';
3+
import Camera from 'react-native-openalpr';
264

27-
const App: () => React$Node = () => {
5+
const App = () => {
6+
console.log(Camera);
287
return (
298
<>
30-
<StatusBar barStyle="dark-content" />
31-
<SafeAreaView>
32-
<ScrollView
33-
contentInsetAdjustmentBehavior="automatic"
34-
style={styles.scrollView}>
35-
<Header />
36-
{global.HermesInternal == null ? null : (
37-
<View style={styles.engine}>
38-
<Text style={styles.footer}>Engine: Hermes</Text>
39-
</View>
40-
)}
41-
<View style={styles.body}>
42-
<View style={styles.sectionContainer}>
43-
<Text style={styles.sectionTitle}>Step One</Text>
44-
<Text style={styles.sectionDescription}>
45-
Edit <Text style={styles.highlight}>App.js</Text> to change this
46-
screen and then come back to see your edits.
47-
</Text>
48-
</View>
49-
<View style={styles.sectionContainer}>
50-
<Text style={styles.sectionTitle}>See Your Changes</Text>
51-
<Text style={styles.sectionDescription}>
52-
<ReloadInstructions />
53-
</Text>
54-
</View>
55-
<View style={styles.sectionContainer}>
56-
<Text style={styles.sectionTitle}>Debug</Text>
57-
<Text style={styles.sectionDescription}>
58-
<DebugInstructions />
59-
</Text>
60-
</View>
61-
<View style={styles.sectionContainer}>
62-
<Text style={styles.sectionTitle}>Learn More</Text>
63-
<Text style={styles.sectionDescription}>
64-
Read the docs to discover what to do next:
65-
</Text>
66-
</View>
67-
<LearnMoreLinks />
68-
</View>
69-
</ScrollView>
70-
</SafeAreaView>
9+
<Camera
10+
showPlateOutline
11+
aspects={Camera.constants.Aspect.fill}
12+
style={styles.camera}
13+
/>
7114
</>
7215
);
7316
};
7417

7518
const styles = StyleSheet.create({
76-
scrollView: {
77-
backgroundColor: Colors.lighter,
78-
},
79-
engine: {
80-
position: 'absolute',
81-
right: 0,
82-
},
83-
body: {
84-
backgroundColor: Colors.white,
85-
},
86-
sectionContainer: {
87-
marginTop: 32,
88-
paddingHorizontal: 24,
89-
},
90-
sectionTitle: {
91-
fontSize: 24,
92-
fontWeight: '600',
93-
color: Colors.black,
94-
},
95-
sectionDescription: {
96-
marginTop: 8,
97-
fontSize: 18,
98-
fontWeight: '400',
99-
color: Colors.dark,
100-
},
101-
highlight: {
102-
fontWeight: '700',
103-
},
104-
footer: {
105-
color: Colors.dark,
106-
fontSize: 12,
107-
fontWeight: '600',
108-
padding: 4,
109-
paddingRight: 12,
110-
textAlign: 'right',
19+
camera: {
20+
flex: 1,
11121
},
11222
});
11323

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

RNOpenALPRExample/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
"ios": "react-native run-ios",
88
"start": "react-native start",
99
"test": "jest",
10-
"lint": "eslint ."
10+
"lint": "eslint .",
11+
"preinstall": "cd .. && yarn pack --filename react-native-openalpr.tgz"
1112
},
1213
"dependencies": {
1314
"react": "16.9.0",
14-
"react-native": "0.61.1"
15+
"react-native": "0.61.1",
16+
"react-native-openalpr": "../react-native-openalpr.tgz"
1517
},
1618
"devDependencies": {
1719
"@babel/core": "^7.6.2",

RNOpenALPRExample/yarn.lock

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5087,6 +5087,10 @@ react-is@^16.8.1, react-is@^16.8.4, react-is@^16.9.0:
50875087
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.10.1.tgz#0612786bf19df406502d935494f0450b40b8294f"
50885088
integrity sha512-BXUMf9sIOPXXZWqr7+c5SeOKJykyVr2u0UDzEf4LNGc6taGkQe1A9DFD07umCIXz45RLr9oAAwZbAJ0Pkknfaw==
50895089

5090+
react-native-openalpr@../react-native-openalpr.tgz:
5091+
version "1.2.0"
5092+
resolved "../react-native-openalpr.tgz#d828fc8007fec67636b78dcbc6f784fa43d92676"
5093+
50905094
react-native@0.61.1:
50915095
version "0.61.1"
50925096
resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.61.1.tgz#ac2559f78f9e689356fedfa93159026a25313d7d"

0 commit comments

Comments
 (0)