@regulaforensics/react-native-document-reader-btdevice 1.1.44-beta → 7.6.6-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/package.json +2 -6
  2. package/.github/ISSUE_TEMPLATE/bug-report.md +0 -39
  3. package/.github/ISSUE_TEMPLATE/config.yml +0 -5
  4. package/.github/ISSUE_TEMPLATE/feature-request.md +0 -20
  5. package/example/.watchmanconfig +0 -1
  6. package/example/App.tsx +0 -314
  7. package/example/android/app/build.gradle +0 -124
  8. package/example/android/app/debug.keystore +0 -0
  9. package/example/android/app/proguard-rules.pro +0 -10
  10. package/example/android/app/src/debug/AndroidManifest.xml +0 -13
  11. package/example/android/app/src/debug/java/com/regula/dr/fullrfid/ReactNativeFlipper.java +0 -75
  12. package/example/android/app/src/main/AndroidManifest.xml +0 -25
  13. package/example/android/app/src/main/java/com/regula/dr/fullrfid/MainActivity.java +0 -32
  14. package/example/android/app/src/main/java/com/regula/dr/fullrfid/MainApplication.java +0 -62
  15. package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -36
  16. package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  17. package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  18. package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  19. package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  20. package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  21. package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  22. package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  23. package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  24. package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  25. package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  26. package/example/android/app/src/main/res/values/strings.xml +0 -3
  27. package/example/android/app/src/main/res/values/styles.xml +0 -10
  28. package/example/android/app/src/release/java/com/regula/dr/fullrfid/ReactNativeFlipper.java +0 -20
  29. package/example/android/build.gradle +0 -19
  30. package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  31. package/example/android/gradle/wrapper/gradle-wrapper.properties +0 -6
  32. package/example/android/gradle.properties +0 -44
  33. package/example/android/gradlew +0 -244
  34. package/example/android/gradlew.bat +0 -92
  35. package/example/android/settings.gradle +0 -4
  36. package/example/images/id.png +0 -0
  37. package/example/images/portrait.png +0 -0
  38. package/example/index.js +0 -8
  39. package/example/ios/.xcode.env +0 -11
  40. package/example/ios/DocumentReader/AppDelegate.h +0 -6
  41. package/example/ios/DocumentReader/AppDelegate.mm +0 -26
  42. package/example/ios/DocumentReader/DocumentReader.entitlements +0 -10
  43. package/example/ios/DocumentReader/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
  44. package/example/ios/DocumentReader/Images.xcassets/Contents.json +0 -6
  45. package/example/ios/DocumentReader/Info.plist +0 -75
  46. package/example/ios/DocumentReader/LaunchScreen.storyboard +0 -47
  47. package/example/ios/DocumentReader/main.m +0 -10
  48. package/example/ios/DocumentReader.xcodeproj/project.pbxproj +0 -730
  49. package/example/ios/DocumentReader.xcodeproj/xcshareddata/xcschemes/DocumentReader.xcscheme +0 -88
  50. package/example/ios/DocumentReader.xcworkspace/contents.xcworkspacedata +0 -10
  51. package/example/ios/DocumentReader.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  52. package/example/ios/DocumentReaderTests/DocumentReaderTests.m +0 -66
  53. package/example/ios/DocumentReaderTests/Info.plist +0 -24
  54. package/example/ios/Podfile +0 -62
  55. package/example/metro.config.js +0 -16
  56. package/example/package-lock.json +0 -14555
  57. package/example/package.json +0 -47
package/package.json CHANGED
@@ -1,17 +1,13 @@
1
1
  {
2
2
  "name": "@regulaforensics/react-native-document-reader-btdevice",
3
- "version": "1.1.44-beta",
3
+ "version": "7.6.6-beta",
4
4
  "description": "React Native module for reading and validation of identification documents (BTDevice framework)",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
8
8
  },
9
9
  "keywords": [
10
- "react-native",
11
- "documentreader",
12
- "reader",
13
- "scanner",
14
- "regula"
10
+ "react-native", "documentreader", "reader", "scanner", "regula"
15
11
  ],
16
12
  "author": "Regulaforensics",
17
13
  "license": "commercial",
@@ -1,39 +0,0 @@
1
- ---
2
- name: Bug Report
3
- about: Create a report to help us improve
4
- title: "[BR] "
5
- labels: bug
6
- assignees: ''
7
-
8
- ---
9
-
10
- **Before Submitting, be sure to**
11
- - [ ] Update to the latest stable version.
12
- - [ ] Read and follow the guides described in the [documentation](https://docs.regulaforensics.com?utm_source=github).
13
- - [ ] Try to reproduce in our demo project.
14
- - [ ] Search for your issue in the existing GitHub issues.
15
-
16
- **Bug Description**
17
- <!--A clear and concise description of what the bug is.-->
18
-
19
- **Steps To Reproduce**
20
- <!--
21
- 1. Go to '...'
22
- 2. Click on '....'
23
- 3. Scroll down to '....'
24
- 4. See error
25
- -->
26
-
27
- **Expected behavior**
28
- <!--A clear and concise description of what you expected to happen.-->
29
-
30
- **Screenshots**
31
- <!--If applicable, add screenshots to help explain your issue.-->
32
-
33
- **Environment:**
34
- - Device: <!--[e.g. iPhone 12]-->
35
- - OS: <!--[e.g. iOS]-->
36
- - OS version: <!--[e.g. 10.0]-->
37
-
38
- **Additional context**
39
- <!--Add any other context about the problem here.-->
@@ -1,5 +0,0 @@
1
- blank_issues_enabled: false
2
- contact_links:
3
- - name: Regula Help Center
4
- url: https://support.regulaforensics.com/hc/requests/new?utm_source=github
5
- about: Please submit any requests here
@@ -1,20 +0,0 @@
1
- ---
2
- name: Feature Request
3
- about: Suggest an idea for this product
4
- title: "[FR] "
5
- labels: enhancement
6
- assignees: ''
7
-
8
- ---
9
-
10
- **Is your feature request related to a problem? Please describe.**
11
- <!--A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]-->
12
-
13
- **Describe the solution you'd like**
14
- <!--A clear and concise description of what you want to happen.-->
15
-
16
- **Describe alternatives you've considered**
17
- <!--A clear and concise description of any alternative solutions or features you've considered.-->
18
-
19
- **Additional context**
20
- <!--Add any other context or screenshots about the feature request here.-->
@@ -1 +0,0 @@
1
- {}
package/example/App.tsx DELETED
@@ -1,314 +0,0 @@
1
-
2
- import React from 'react'
3
- import { SafeAreaView, ScrollView, StyleSheet, Text, View, NativeEventEmitter, Image, Button, TextInput } from 'react-native'
4
- import DocumentReader, { Enum, DocumentReaderCompletion, DocumentReaderScenario, RNRegulaDocumentReader, DocumentReaderResults, ScannerConfig, RecognizeConfig } from '@regulaforensics/react-native-document-reader-api'
5
- import RadioGroup, { RadioButtonProps } from 'react-native-radio-buttons-group'
6
- import { CheckBox } from '@rneui/themed'
7
- import Icon from 'react-native-vector-icons/FontAwesome'
8
- import { launchImageLibrary } from 'react-native-image-picker'
9
-
10
- var isReadingRfid = false
11
-
12
- interface IProps {
13
- }
14
-
15
- interface IState {
16
- btDeviceName: string,
17
- isBleServiceConnected: boolean,
18
- isBleDeviceReady: boolean,
19
- fullName: string | undefined
20
- doRfid: boolean
21
- canRfid: boolean
22
- canRfidTitle: string
23
- radioButtons: any
24
- selectedScenario: string
25
- portrait: any
26
- docFront: any
27
- }
28
-
29
- export default class App extends React.Component<IProps, IState> {
30
- constructor(props: {} | Readonly<{}>) {
31
- super(props)
32
- Icon.loadFont()
33
-
34
- var eventManager = new NativeEventEmitter(RNRegulaDocumentReader)
35
- eventManager.addListener('prepareDatabaseProgressChangeEvent', e => this.setState({ fullName: "Downloading database: " + e["msg"] + "%" }))
36
- eventManager.addListener('completionEvent', (e) => this.handleCompletion(DocumentReaderCompletion.fromJson(JSON.parse(e["msg"]))!))
37
-
38
- eventManager.addListener('bleOnServiceConnectedEvent', (_) => this.bleOnServiceConnected())
39
- eventManager.addListener('bleOnServiceDisconnectedEvent', (_) => this.bleOnServiceDisconnected())
40
- eventManager.addListener('bleOnDeviceReadyEvent', (_) => this.bleOnDeviceReady())
41
-
42
- DocumentReader.prepareDatabase("FullAuth", (respond) => {
43
- console.log(respond)
44
- this.setState({ fullName: "Database prepared" })
45
- }, error => console.log(error))
46
-
47
- this.state = {
48
- btDeviceName: "Regula 0000",
49
- isBleServiceConnected: false,
50
- isBleDeviceReady: false,
51
- fullName: "Please wait...",
52
- doRfid: false,
53
- canRfid: false,
54
- canRfidTitle: "(unavailable)",
55
- radioButtons: [{ label: 'Loading', id: "0" }],
56
- selectedScenario: "",
57
- portrait: require('./images/portrait.png'),
58
- docFront: require('./images/id.png')
59
- }
60
- }
61
-
62
- bleOnServiceConnected() {
63
- console.log("bleService connected, searching devices")
64
-
65
- this.setState({ isBleServiceConnected: true })
66
-
67
- setTimeout(() => {
68
- if (!this.state.isBleDeviceReady) {
69
- console.log("Failed to connect to the torch device")
70
- this.setState({ fullName: "Failed to connect to the torch device" })
71
- }
72
- }, 7000)
73
- }
74
-
75
- bleOnServiceDisconnected() {
76
- console.log("bleService disconnected")
77
-
78
- this.setState({ isBleServiceConnected: false })
79
- }
80
-
81
- bleOnDeviceReady() {
82
- console.log("device connected, initializing")
83
-
84
- this.setState({ fullName: "Initializing..." })
85
- this.setState({ isBleDeviceReady: true })
86
- DocumentReader.initializeReaderBleDeviceConfig((response) => {
87
- this.onInitCompleted(response)
88
- }, error => {
89
- this.setState({ fullName: error })
90
- console.log(error)
91
- })
92
- }
93
-
94
- checkPermissionsAndConnect() {
95
- DocumentReader.isBlePermissionsGranted(granted => {
96
- if (granted) {
97
- this.setState({ fullName: "Loading..." })
98
- if (!this.state.isBleServiceConnected) {
99
- console.log("connecting bleService")
100
- DocumentReader.setConfig({
101
- functionality: {
102
- useAuthenticator: true,
103
- btDeviceName: this.state.btDeviceName
104
- }
105
- }, s => DocumentReader.startBluetoothService(s => { }, e => { }), e => { })
106
- } else console.log("bleService already connected")
107
- } else
108
- this.setState({ fullName: "ble permissions denied" })
109
- }, e => console.log(e))
110
- }
111
-
112
- onInitCompleted(response: string) {
113
- console.log(response)
114
- DocumentReader.isRFIDAvailableForUse((canRfid) => {
115
- if (canRfid) this.setState({ canRfid: true, canRfidTitle: '' })
116
- }, error => console.log(error))
117
- DocumentReader.getAvailableScenarios((jstring) => {
118
- var scenarios = JSON.parse(jstring)
119
- var items: RadioButtonProps[] = []
120
- for (var i in scenarios) {
121
- var scenario = DocumentReaderScenario.fromJson(typeof scenarios[i] === "string" ? JSON.parse(scenarios[i]) : scenarios[i])!.name!
122
- items.push({ label: scenario, id: scenario })
123
- }
124
- this.setState({ radioButtons: items })
125
- this.setState({ selectedScenario: this.state.radioButtons[0]['id'] })
126
- DocumentReader.setConfig({
127
- functionality: {
128
- videoCaptureMotionControl: true,
129
- showCaptureButton: true
130
- },
131
- customization: {
132
- showResultStatusMessages: true,
133
- showStatusMessages: true
134
- },
135
- processParams: {
136
- scenario: this.state.selectedScenario,
137
- doRfid: this.state.doRfid,
138
- },
139
- }, _ => { }, error => console.log(error))
140
-
141
- DocumentReader.getDocumentReaderIsReady((isReady) => {
142
- if (isReady) {
143
- this.setState({ fullName: "Ready" })
144
- DocumentReader.setRfidDelegate(Enum.RFIDDelegate.NO_PA, _ => { }, error => console.log(error))
145
- } else
146
- this.setState({ fullName: "Failed" })
147
- }, error => console.log(error))
148
- }, error => console.log(error))
149
- }
150
-
151
- handleCompletion(completion: DocumentReaderCompletion) {
152
- if (completion.action === Enum.DocReaderAction.COMPLETE || completion.action === Enum.DocReaderAction.TIMEOUT)
153
- this.handleResults(completion.results!)
154
- }
155
-
156
- clearResults() {
157
- this.setState({ fullName: "Ready", docFront: require('./images/id.png'), portrait: require('./images/portrait.png') })
158
- }
159
-
160
- scan() {
161
- this.clearResults()
162
- var config = new ScannerConfig()
163
- config.scenario = this.state.selectedScenario
164
- DocumentReader.scan(config, _ => { }, e => console.log(e))
165
- }
166
-
167
- recognize() {
168
- launchImageLibrary({
169
- mediaType: 'photo',
170
- includeBase64: true,
171
- selectionLimit: 10
172
- }, r => {
173
- if (r.errorCode != null) {
174
- console.log("error code: " + r.errorCode)
175
- console.log("error message: " + r.errorMessage)
176
- this.setState({ fullName: r.errorMessage })
177
- return
178
- }
179
- if (r.didCancel) return
180
- this.clearResults()
181
- this.setState({ fullName: "COPYING IMAGE..." })
182
- var response = r.assets
183
-
184
- var images: any = []
185
-
186
- for (var i = 0; i < response!.length; i++) {
187
- images.push(response![i].base64!)
188
- }
189
- this.setState({ fullName: "PROCESSING..." })
190
-
191
- var config = new RecognizeConfig()
192
- config.scenario = this.state.selectedScenario
193
- config.images = images
194
- DocumentReader.recognize(config, _ => { }, e => console.log(e))
195
- })
196
- }
197
-
198
- displayResults(results: DocumentReaderResults) {
199
- if (results == null) return
200
-
201
- results.textFieldValueByType(Enum.eVisualFieldType.FT_SURNAME_AND_GIVEN_NAMES, (value: string | undefined) => {
202
- this.setState({ fullName: value })
203
- }, (error: string) => console.log(error))
204
-
205
- results.graphicFieldImageByType(Enum.eGraphicFieldType.GF_DOCUMENT_IMAGE, (value: string | undefined) => {
206
- if (value != null && value != "")
207
- this.setState({ docFront: { uri: "data:image/png;base64," + value } })
208
- }, (error: string) => console.log(error))
209
-
210
- results.graphicFieldImageByType(Enum.eGraphicFieldType.GF_PORTRAIT, (value: string | undefined) => {
211
- if (value != null && value != "")
212
- this.setState({ portrait: { uri: "data:image/png;base64," + value } })
213
- }, (error: string) => console.log(error))
214
- }
215
-
216
- handleResults(results: DocumentReaderResults) {
217
- if (this.state.doRfid && !isReadingRfid && results != null && results.chipPage != 0) {
218
- isReadingRfid = true
219
- DocumentReader.startRFIDReader(_ => { }, _ => { })
220
- } else {
221
- isReadingRfid = false
222
- this.displayResults(results)
223
- }
224
- }
225
-
226
- render() {
227
- return (
228
- <SafeAreaView style={styles.container}>
229
- <View style={styles.container}>
230
- <Text style={styles.title}>{this.state.fullName}</Text>
231
-
232
- <View style={{ flexDirection: "row", padding: 5 }}>
233
- <View style={{ flexDirection: "column", alignItems: "center" }}>
234
- <Text style={styles.imageLabel}>Portrait</Text>
235
- <Image style={{ height: 150, width: 150 }} source={this.state.portrait} resizeMode="contain" />
236
- </View>
237
- <View style={{ flexDirection: "column", alignItems: "center", padding: 5 }}>
238
- <Text style={styles.imageLabel}>Document image</Text>
239
- <Image style={{ height: 150, width: 200 }} source={this.state.docFront} resizeMode="contain" />
240
- </View>
241
- </View>
242
-
243
- <ScrollView style={{ padding: 5, alignSelf: 'center' }} showsVerticalScrollIndicator={false}>
244
- <RadioGroup
245
- containerStyle={{ alignItems: 'flex-start' }}
246
- radioButtons={this.state.radioButtons}
247
- onPress={(selectedID) => { this.setState({ selectedScenario: selectedID }) }}
248
- selectedId={this.state.selectedScenario}
249
- />
250
- </ScrollView>
251
-
252
- <View style={{ flexDirection: 'row', padding: 5 }}>
253
- <CheckBox
254
- containerStyle={{ backgroundColor: '#F5FCFF' }}
255
- checked={this.state.doRfid}
256
- title={'Process rfid reading' + this.state.canRfidTitle}
257
- onPress={() => {
258
- if (this.state.canRfid) {
259
- this.setState({ doRfid: !this.state.doRfid })
260
- }
261
- }} />
262
- </View>
263
-
264
- <View style={{ flexDirection: 'row', alignItems: 'center' }}>
265
- <Text>btDeviceName: </Text>
266
- <TextInput
267
- style={styles.input}
268
- onChangeText={(text) => this.setState({ btDeviceName: text })}
269
- value={this.state.btDeviceName}
270
- placeholder="btDeviceName"
271
- />
272
- </View>
273
-
274
- <View style={{ flexDirection: 'row' }}>
275
- <Button color="#4285F4" title="Scan document" onPress={() => this.scan()} />
276
- <Text style={{ padding: 5 }}></Text>
277
- <Button color="#4285F4" title="Start service" onPress={() => this.checkPermissionsAndConnect()} />
278
- </View>
279
- </View>
280
- </SafeAreaView>
281
- )
282
- }
283
- }
284
-
285
- const styles = StyleSheet.create({
286
- input: {
287
- height: 40,
288
- margin: 12,
289
- borderWidth: 0.5,
290
- borderRadius: 3,
291
- padding: 10,
292
- color: "black"
293
- },
294
- container: {
295
- width: '100%',
296
- height: '100%',
297
- flex: 1,
298
- justifyContent: 'center',
299
- alignItems: 'center',
300
- backgroundColor: '#F5FCFF',
301
- marginBottom: 12,
302
- },
303
- imageLabel: {
304
- top: 1,
305
- right: 1,
306
- padding: 5
307
- },
308
- title: {
309
- top: 1,
310
- left: 1,
311
- padding: 30,
312
- fontSize: 20
313
- }
314
- })
@@ -1,124 +0,0 @@
1
- apply plugin: "com.android.application"
2
- apply plugin: "com.facebook.react"
3
-
4
- /**
5
- * This is the configuration block to customize your React Native Android app.
6
- * By default you don't need to apply any configuration, just uncomment the lines you need.
7
- */
8
- react {
9
- /* Folders */
10
- // The root of your project, i.e. where "package.json" lives. Default is '..'
11
- // root = file("../")
12
- // The folder where the react-native NPM package is. Default is ../node_modules/react-native
13
- // reactNativeDir = file("../node_modules/react-native")
14
- // The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
15
- // codegenDir = file("../node_modules/@react-native/codegen")
16
- // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
17
- // cliFile = file("../node_modules/react-native/cli.js")
18
-
19
- /* Variants */
20
- // The list of variants to that are debuggable. For those we're going to
21
- // skip the bundling of the JS bundle and the assets. By default is just 'debug'.
22
- // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
23
- // debuggableVariants = ["liteDebug", "prodDebug"]
24
-
25
- /* Bundling */
26
- // A list containing the node command and its flags. Default is just 'node'.
27
- // nodeExecutableAndArgs = ["node"]
28
- //
29
- // The command to run when bundling. By default is 'bundle'
30
- // bundleCommand = "ram-bundle"
31
- //
32
- // The path to the CLI configuration file. Default is empty.
33
- // bundleConfig = file(../rn-cli.config.js)
34
- //
35
- // The name of the generated asset file containing your JS bundle
36
- // bundleAssetName = "MyApplication.android.bundle"
37
- //
38
- // The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
39
- // entryFile = file("../js/MyApplication.android.js")
40
- //
41
- // A list of extra flags to pass to the 'bundle' commands.
42
- // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
43
- // extraPackagerArgs = []
44
-
45
- /* Hermes Commands */
46
- // The hermes compiler command to run. By default it is 'hermesc'
47
- // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
48
- //
49
- // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
50
- // hermesFlags = ["-O", "-output-source-map"]
51
- }
52
-
53
- /**
54
- * Set this to true to Run Proguard on Release builds to minify the Java bytecode.
55
- */
56
- def enableProguardInReleaseBuilds = false
57
-
58
- /**
59
- * The preferred build flavor of JavaScriptCore (JSC)
60
- *
61
- * For example, to use the international variant, you can use:
62
- * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
63
- *
64
- * The international variant includes ICU i18n library and necessary data
65
- * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
66
- * give correct results when using with locales other than en-US. Note that
67
- * this variant is about 6MiB larger per architecture than default.
68
- */
69
- def jscFlavor = 'org.webkit:android-jsc:+'
70
-
71
- android {
72
- ndkVersion rootProject.ext.ndkVersion
73
-
74
- compileSdk rootProject.ext.compileSdkVersion
75
-
76
- namespace "com.regula.dr.fullrfid"
77
- defaultConfig {
78
- applicationId "com.regula.dr.fullrfid"
79
- minSdkVersion rootProject.ext.minSdkVersion
80
- targetSdkVersion rootProject.ext.targetSdkVersion
81
- versionCode 1
82
- versionName "1.0"
83
- }
84
- signingConfigs {
85
- debug {
86
- storeFile file('debug.keystore')
87
- storePassword 'android'
88
- keyAlias 'androiddebugkey'
89
- keyPassword 'android'
90
- }
91
- }
92
- buildTypes {
93
- debug {
94
- signingConfig signingConfigs.debug
95
- }
96
- release {
97
- // Caution! In production, you need to generate your own keystore file.
98
- // see https://reactnative.dev/docs/signed-apk-android.
99
- signingConfig signingConfigs.debug
100
- minifyEnabled enableProguardInReleaseBuilds
101
- proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
102
- }
103
- }
104
- }
105
-
106
- dependencies {
107
- // The version of react-native is set by the React Native Gradle Plugin
108
- implementation("com.facebook.react:react-android")
109
-
110
- debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
111
- debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
112
- exclude group:'com.squareup.okhttp3', module:'okhttp'
113
- }
114
-
115
- debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
116
- if (hermesEnabled.toBoolean()) {
117
- implementation("com.facebook.react:hermes-android")
118
- } else {
119
- implementation jscFlavor
120
- }
121
- }
122
-
123
- apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
124
- apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
Binary file
@@ -1,10 +0,0 @@
1
- # Add project specific ProGuard rules here.
2
- # By default, the flags in this file are appended to flags specified
3
- # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4
- # You can edit the include path and order by changing the proguardFiles
5
- # directive in build.gradle.
6
- #
7
- # For more details, see
8
- # http://developer.android.com/guide/developing/tools/proguard.html
9
-
10
- # Add any project specific keep options here:
@@ -1,13 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
- xmlns:tools="http://schemas.android.com/tools">
4
-
5
- <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
6
-
7
- <application
8
- android:usesCleartextTraffic="true"
9
- tools:targetApi="28"
10
- tools:ignore="GoogleAppIndexingWarning">
11
- <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
12
- </application>
13
- </manifest>
@@ -1,75 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * <p>This source code is licensed under the MIT license found in the LICENSE file in the root
5
- * directory of this source tree.
6
- */
7
- package com.regula.dr.fullrfid;
8
-
9
- import android.content.Context;
10
- import com.facebook.flipper.android.AndroidFlipperClient;
11
- import com.facebook.flipper.android.utils.FlipperUtils;
12
- import com.facebook.flipper.core.FlipperClient;
13
- import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
14
- import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
15
- import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
16
- import com.facebook.flipper.plugins.inspector.DescriptorMapping;
17
- import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
18
- import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
19
- import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
20
- import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
21
- import com.facebook.react.ReactInstanceEventListener;
22
- import com.facebook.react.ReactInstanceManager;
23
- import com.facebook.react.bridge.ReactContext;
24
- import com.facebook.react.modules.network.NetworkingModule;
25
- import okhttp3.OkHttpClient;
26
-
27
- /**
28
- * Class responsible of loading Flipper inside your React Native application. This is the debug
29
- * flavor of it. Here you can add your own plugins and customize the Flipper setup.
30
- */
31
- public class ReactNativeFlipper {
32
- public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
33
- if (FlipperUtils.shouldEnableFlipper(context)) {
34
- final FlipperClient client = AndroidFlipperClient.getInstance(context);
35
-
36
- client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
37
- client.addPlugin(new DatabasesFlipperPlugin(context));
38
- client.addPlugin(new SharedPreferencesFlipperPlugin(context));
39
- client.addPlugin(CrashReporterPlugin.getInstance());
40
-
41
- NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
42
- NetworkingModule.setCustomClientBuilder(
43
- new NetworkingModule.CustomClientBuilder() {
44
- @Override
45
- public void apply(OkHttpClient.Builder builder) {
46
- builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
47
- }
48
- });
49
- client.addPlugin(networkFlipperPlugin);
50
- client.start();
51
-
52
- // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
53
- // Hence we run if after all native modules have been initialized
54
- ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
55
- if (reactContext == null) {
56
- reactInstanceManager.addReactInstanceEventListener(
57
- new ReactInstanceEventListener() {
58
- @Override
59
- public void onReactContextInitialized(ReactContext reactContext) {
60
- reactInstanceManager.removeReactInstanceEventListener(this);
61
- reactContext.runOnNativeModulesQueueThread(
62
- new Runnable() {
63
- @Override
64
- public void run() {
65
- client.addPlugin(new FrescoFlipperPlugin());
66
- }
67
- });
68
- }
69
- });
70
- } else {
71
- client.addPlugin(new FrescoFlipperPlugin());
72
- }
73
- }
74
- }
75
- }
@@ -1,25 +0,0 @@
1
- <manifest xmlns:android="http://schemas.android.com/apk/res/android">
2
-
3
- <uses-permission android:name="android.permission.INTERNET" />
4
-
5
- <application
6
- android:name=".MainApplication"
7
- android:label="@string/app_name"
8
- android:icon="@mipmap/ic_launcher"
9
- android:roundIcon="@mipmap/ic_launcher_round"
10
- android:allowBackup="false"
11
- android:theme="@style/AppTheme">
12
- <activity
13
- android:name=".MainActivity"
14
- android:label="@string/app_name"
15
- android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
16
- android:launchMode="singleTask"
17
- android:windowSoftInputMode="adjustResize"
18
- android:exported="true">
19
- <intent-filter>
20
- <action android:name="android.intent.action.MAIN" />
21
- <category android:name="android.intent.category.LAUNCHER" />
22
- </intent-filter>
23
- </activity>
24
- </application>
25
- </manifest>