@regulaforensics/face-sdk 6.3.3-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.
- package/README.md +23 -0
- package/RNFaceSDK.podspec +21 -0
- package/android/CVDFaceSDK.kt +34 -0
- package/android/build.gradle +48 -0
- package/android/cordova.gradle +18 -0
- package/android/src/main/AndroidManifest.xml +1 -0
- package/android/src/main/java/com/regula/plugin/facesdk/Config.kt +165 -0
- package/android/src/main/java/com/regula/plugin/facesdk/JSONConstructor.kt +904 -0
- package/android/src/main/java/com/regula/plugin/facesdk/Main.kt +370 -0
- package/android/src/main/java/com/regula/plugin/facesdk/RNFaceApiModule.kt +54 -0
- package/android/src/main/java/com/regula/plugin/facesdk/RNFaceApiPackage.kt +11 -0
- package/android/src/main/java/com/regula/plugin/facesdk/Utils.kt +287 -0
- package/examples/capacitor/.browserslistrc +6 -0
- package/examples/capacitor/.eslintrc.js +17 -0
- package/examples/capacitor/README.md +27 -0
- package/examples/capacitor/android/app/build.gradle +54 -0
- package/examples/capacitor/android/app/capacitor.build.gradle +22 -0
- package/examples/capacitor/android/app/proguard-rules.pro +21 -0
- package/examples/capacitor/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java +26 -0
- package/examples/capacitor/android/app/src/main/AndroidManifest.xml +43 -0
- package/examples/capacitor/android/app/src/main/java/com/regula/faceapi/MainActivity.java +5 -0
- package/examples/capacitor/android/app/src/main/res/drawable/ic_launcher_background.xml +170 -0
- package/examples/capacitor/android/app/src/main/res/drawable/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-land-hdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-land-mdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-land-xhdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-land-xxhdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-land-xxxhdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-port-hdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-port-mdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-port-xhdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-port-xxhdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-port-xxxhdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml +34 -0
- package/examples/capacitor/android/app/src/main/res/layout/activity_main.xml +12 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +5 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +5 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/examples/capacitor/android/app/src/main/res/values/ic_launcher_background.xml +4 -0
- package/examples/capacitor/android/app/src/main/res/values/strings.xml +7 -0
- package/examples/capacitor/android/app/src/main/res/values/styles.xml +22 -0
- package/examples/capacitor/android/app/src/main/res/xml/file_paths.xml +5 -0
- package/examples/capacitor/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java +18 -0
- package/examples/capacitor/android/build.gradle +30 -0
- package/examples/capacitor/android/capacitor.settings.gradle +15 -0
- package/examples/capacitor/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/examples/capacitor/android/gradle/wrapper/gradle-wrapper.properties +6 -0
- package/examples/capacitor/android/gradle.properties +22 -0
- package/examples/capacitor/android/gradlew +244 -0
- package/examples/capacitor/android/gradlew.bat +92 -0
- package/examples/capacitor/android/settings.gradle +5 -0
- package/examples/capacitor/android/variables.gradle +16 -0
- package/examples/capacitor/capacitor.config.ts +12 -0
- package/examples/capacitor/cypress/e2e/test.cy.ts +6 -0
- package/examples/capacitor/cypress/fixtures/example.json +5 -0
- package/examples/capacitor/cypress/support/commands.ts +37 -0
- package/examples/capacitor/cypress/support/e2e.ts +20 -0
- package/examples/capacitor/cypress.config.ts +10 -0
- package/examples/capacitor/index.html +106 -0
- package/examples/capacitor/ionic.config.json +7 -0
- package/examples/capacitor/ios/App/App/App.entitlements +5 -0
- package/examples/capacitor/ios/App/App/AppDelegate.swift +49 -0
- package/examples/capacitor/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png +0 -0
- package/examples/capacitor/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json +14 -0
- package/examples/capacitor/ios/App/App/Assets.xcassets/Contents.json +6 -0
- package/examples/capacitor/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json +23 -0
- package/examples/capacitor/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png +0 -0
- package/examples/capacitor/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png +0 -0
- package/examples/capacitor/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png +0 -0
- package/examples/capacitor/ios/App/App/Base.lproj/LaunchScreen.storyboard +32 -0
- package/examples/capacitor/ios/App/App/Base.lproj/Main.storyboard +19 -0
- package/examples/capacitor/ios/App/App/Info.plist +53 -0
- package/examples/capacitor/ios/App/App.xcodeproj/project.pbxproj +410 -0
- package/examples/capacitor/ios/App/App.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/examples/capacitor/ios/App/App.xcworkspace/contents.xcworkspacedata +10 -0
- package/examples/capacitor/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/examples/capacitor/ios/App/Podfile +27 -0
- package/examples/capacitor/package.json +64 -0
- package/examples/capacitor/public/assets/.gitkeep +0 -0
- package/examples/capacitor/public/assets/img/id.png +0 -0
- package/examples/capacitor/public/assets/img/portrait.png +0 -0
- package/examples/capacitor/public/favicon.png +0 -0
- package/examples/capacitor/public/manifest.json +21 -0
- package/examples/capacitor/src/App.test.tsx +8 -0
- package/examples/capacitor/src/App.tsx +42 -0
- package/examples/capacitor/src/components/ExploreContainer.css +24 -0
- package/examples/capacitor/src/components/ExploreContainer.tsx +14 -0
- package/examples/capacitor/src/main.tsx +11 -0
- package/examples/capacitor/src/pages/Home.tsx +159 -0
- package/examples/capacitor/src/setupTests.ts +14 -0
- package/examples/capacitor/src/theme/variables.css +242 -0
- package/examples/capacitor/src/vite-env.d.ts +1 -0
- package/examples/capacitor/tsconfig.json +21 -0
- package/examples/capacitor/tsconfig.node.json +9 -0
- package/examples/capacitor/vite.config.ts +16 -0
- package/examples/cordova/.vscode/launch.json +28 -0
- package/examples/cordova/config.xml +37 -0
- package/examples/cordova/jsconfig.json +1 -0
- package/examples/cordova/package.json +40 -0
- package/examples/cordova/www/css/index.css +107 -0
- package/examples/cordova/www/img/id.png +0 -0
- package/examples/cordova/www/img/logo.png +0 -0
- package/examples/cordova/www/img/portrait.png +0 -0
- package/examples/cordova/www/index.html +94 -0
- package/examples/cordova/www/js/index.js +154 -0
- package/examples/ionic/angular.json +187 -0
- package/examples/ionic/browserslist +12 -0
- package/examples/ionic/config.xml +114 -0
- package/examples/ionic/e2e/protractor.conf.js +28 -0
- package/examples/ionic/e2e/src/app.e2e-spec.ts +14 -0
- package/examples/ionic/e2e/src/app.po.ts +11 -0
- package/examples/ionic/e2e/tsconfig.json +13 -0
- package/examples/ionic/ionic.config.json +7 -0
- package/examples/ionic/karma.conf.js +31 -0
- package/examples/ionic/package.json +97 -0
- package/examples/ionic/resources/README.md +8 -0
- package/examples/ionic/resources/android/icon/drawable-hdpi-icon.png +0 -0
- package/examples/ionic/resources/android/icon/drawable-ldpi-icon.png +0 -0
- package/examples/ionic/resources/android/icon/drawable-mdpi-icon.png +0 -0
- package/examples/ionic/resources/android/icon/drawable-xhdpi-icon.png +0 -0
- package/examples/ionic/resources/android/icon/drawable-xxhdpi-icon.png +0 -0
- package/examples/ionic/resources/android/icon/drawable-xxxhdpi-icon.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-land-hdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-land-ldpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-land-mdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-land-xhdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-land-xxhdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-land-xxxhdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-port-hdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-port-ldpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-port-mdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-port-xhdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-port-xxhdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-port-xxxhdpi-screen.png +0 -0
- package/examples/ionic/resources/android/xml/network_security_config.xml +6 -0
- package/examples/ionic/resources/icon.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-1024.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-20.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-20@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-20@3x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-24@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-27.5@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-29.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-29@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-29@3x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-40.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-40@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-40@3x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-44@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-50.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-50@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-60.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-60@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-60@3x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-72.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-72@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-76.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-76@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-83.5@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-86@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-98@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-small.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-small@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-small@3x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon.png +0 -0
- package/examples/ionic/resources/ios/icon/icon@2x.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-2436h.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-568h@2x~iphone.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-667h.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-736h.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-Landscape-2436h.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-Landscape-736h.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-Landscape@2x~ipad.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-Landscape@~ipadpro.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-Landscape~ipad.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-Portrait@2x~ipad.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-Portrait@~ipadpro.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-Portrait~ipad.png +0 -0
- package/examples/ionic/resources/ios/splash/Default@2x~iphone.png +0 -0
- package/examples/ionic/resources/ios/splash/Default@2x~universal~anyany.png +0 -0
- package/examples/ionic/resources/ios/splash/Default~iphone.png +0 -0
- package/examples/ionic/resources/splash.png +0 -0
- package/examples/ionic/src/app/app-routing.module.ts +15 -0
- package/examples/ionic/src/app/app.component.html +3 -0
- package/examples/ionic/src/app/app.component.scss +0 -0
- package/examples/ionic/src/app/app.component.spec.ts +47 -0
- package/examples/ionic/src/app/app.component.ts +27 -0
- package/examples/ionic/src/app/app.module.ts +23 -0
- package/examples/ionic/src/app/home/home.module.ts +29 -0
- package/examples/ionic/src/app/home/home.page.html +75 -0
- package/examples/ionic/src/app/home/home.page.scss +1 -0
- package/examples/ionic/src/app/home/home.page.spec.ts +24 -0
- package/examples/ionic/src/app/home/home.page.ts +166 -0
- package/examples/ionic/src/assets/icon/favicon.png +0 -0
- package/examples/ionic/src/assets/img/portrait.png +0 -0
- package/examples/ionic/src/assets/shapes.svg +1 -0
- package/examples/ionic/src/environments/environment.prod.ts +3 -0
- package/examples/ionic/src/environments/environment.ts +16 -0
- package/examples/ionic/src/global.scss +31 -0
- package/examples/ionic/src/index.html +25 -0
- package/examples/ionic/src/main.ts +12 -0
- package/examples/ionic/src/polyfills.ts +66 -0
- package/examples/ionic/src/test.ts +20 -0
- package/examples/ionic/src/theme/variables.scss +77 -0
- package/examples/ionic/src/zone-flags.ts +5 -0
- package/examples/ionic/tsconfig.app.json +14 -0
- package/examples/ionic/tsconfig.json +26 -0
- package/examples/ionic/tsconfig.spec.json +19 -0
- package/examples/ionic/tslint.json +88 -0
- package/examples/react-native/.vscode/launch.json +26 -0
- package/examples/react-native/.watchmanconfig +1 -0
- package/examples/react-native/App.tsx +206 -0
- package/examples/react-native/Gemfile +8 -0
- package/examples/react-native/Gemfile.lock +134 -0
- package/examples/react-native/android/app/build.gradle +123 -0
- package/examples/react-native/android/app/debug.keystore +0 -0
- package/examples/react-native/android/app/proguard-rules.pro +10 -0
- package/examples/react-native/android/app/src/debug/AndroidManifest.xml +9 -0
- package/examples/react-native/android/app/src/main/AndroidManifest.xml +27 -0
- package/examples/react-native/android/app/src/main/assets/.gitkeep +0 -0
- package/examples/react-native/android/app/src/main/java/com/regula/face/api/MainActivity.kt +22 -0
- package/examples/react-native/android/app/src/main/java/com/regula/face/api/MainApplication.kt +43 -0
- package/examples/react-native/android/app/src/main/res/drawable/rn_edit_text_material.xml +37 -0
- package/examples/react-native/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/examples/react-native/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/examples/react-native/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/examples/react-native/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/examples/react-native/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/examples/react-native/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/examples/react-native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/examples/react-native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/examples/react-native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/examples/react-native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/examples/react-native/android/app/src/main/res/values/strings.xml +3 -0
- package/examples/react-native/android/app/src/main/res/values/styles.xml +9 -0
- package/examples/react-native/android/build.gradle +21 -0
- package/examples/react-native/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/examples/react-native/android/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/examples/react-native/android/gradle.properties +39 -0
- package/examples/react-native/android/gradlew +249 -0
- package/examples/react-native/android/gradlew.bat +92 -0
- package/examples/react-native/android/settings.gradle +6 -0
- package/examples/react-native/images/portrait.png +0 -0
- package/examples/react-native/index.js +4 -0
- package/examples/react-native/ios/.xcode.env +11 -0
- package/examples/react-native/ios/FaceSDK/AppDelegate.h +6 -0
- package/examples/react-native/ios/FaceSDK/AppDelegate.mm +31 -0
- package/examples/react-native/ios/FaceSDK/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
- package/examples/react-native/ios/FaceSDK/Images.xcassets/Contents.json +6 -0
- package/examples/react-native/ios/FaceSDK/Info.plist +51 -0
- package/examples/react-native/ios/FaceSDK/LaunchScreen.storyboard +47 -0
- package/examples/react-native/ios/FaceSDK/PrivacyInfo.xcprivacy +38 -0
- package/examples/react-native/ios/FaceSDK/main.m +10 -0
- package/examples/react-native/ios/FaceSDK.xcodeproj/project.pbxproj +719 -0
- package/examples/react-native/ios/FaceSDK.xcodeproj/xcshareddata/xcschemes/FaceSDK.xcscheme +88 -0
- package/examples/react-native/ios/FaceSDK.xcworkspace/contents.xcworkspacedata +10 -0
- package/examples/react-native/ios/FaceSDK.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/examples/react-native/ios/FaceSDKTests/FaceSDKTests.m +66 -0
- package/examples/react-native/ios/FaceSDKTests/Info.plist +24 -0
- package/examples/react-native/ios/Podfile +40 -0
- package/examples/react-native/ios/Podfile.lock +1822 -0
- package/examples/react-native/ios/license/.gitkeep +0 -0
- package/examples/react-native/metro.config.js +15 -0
- package/examples/react-native/package-lock.json +13098 -0
- package/examples/react-native/package.json +42 -0
- package/ios/CVDFaceSDK.h +7 -0
- package/ios/CVDFaceSDK.m +34 -0
- package/ios/RFSWConfig.h +27 -0
- package/ios/RFSWConfig.m +189 -0
- package/ios/RFSWJSONConstructor.h +134 -0
- package/ios/RFSWJSONConstructor.m +977 -0
- package/ios/RFSWMain.h +23 -0
- package/ios/RFSWMain.m +352 -0
- package/ios/RNFaceSDK.h +8 -0
- package/ios/RNFaceSDK.m +42 -0
- package/ios-ci/.gitlab-ci.yml +41 -0
- package/ios-ci/.sample-env +22 -0
- package/ios-ci/README.md +97 -0
- package/ios-ci/RegulaDanger/Package.swift +34 -0
- package/ios-ci/RegulaDanger/Sources/RegulaDanger/RegulaDanger.swift +44 -0
- package/ios-ci/RegulaDanger/Tests/LinuxMain.swift +7 -0
- package/ios-ci/RegulaDanger/Tests/RegulaDangerTests/RegulaDangerTests.swift +15 -0
- package/ios-ci/RegulaDanger/Tests/RegulaDangerTests/XCTestManifests.swift +9 -0
- package/ios-ci/install.sh +9 -0
- package/ios-ci/ios_ci/__init__.py +8 -0
- package/ios-ci/ios_ci/cli.py +408 -0
- package/ios-ci/ios_ci/common/__init__.py +0 -0
- package/ios-ci/ios_ci/common/build_index.py +70 -0
- package/ios-ci/ios_ci/common/clean_cocoapod.sh +13 -0
- package/ios-ci/ios_ci/common/dependency.py +466 -0
- package/ios-ci/ios_ci/common/ftp.py +314 -0
- package/ios-ci/ios_ci/common/searchpod.sh +6 -0
- package/ios-ci/ios_ci/common/wait_for_cocopod.sh +21 -0
- package/ios-ci/ios_ci/inject.py +145 -0
- package/ios-ci/ios_ci/podspec/__init__.py +0 -0
- package/ios-ci/ios_ci/podspec/podspec.py +88 -0
- package/ios-ci/ios_ci/podspec/templates/BTDevice.podspec +17 -0
- package/ios-ci/ios_ci/podspec/templates/Core.podspec +17 -0
- package/ios-ci/ios_ci/podspec/templates/DocumentReader.podspec +19 -0
- package/ios-ci/ios_ci/podspec/templates/FaceCore.podspec +17 -0
- package/ios-ci/ios_ci/podspec/templates/FaceSDK.podspec +18 -0
- package/ios-ci/ios_ci/podspec/templates/IRS.podspec +17 -0
- package/ios-ci/ios_ci/podspec/templates/RegulaCommon.podspec +17 -0
- package/ios-ci/ios_ci/resolve_podfile_common.py +76 -0
- package/ios-ci/ios_ci/spm/AppleRootCA-G3.cer +0 -0
- package/ios-ci/ios_ci/spm/AppleWWDRCAG3.cer +0 -0
- package/ios-ci/ios_ci/spm/SwiftPackageGenerator+Common.sh +48 -0
- package/ios-ci/ios_ci/spm/SwiftPackageGenerator.sh +33 -0
- package/ios-ci/ios_ci/spm/XcodeSPMCollection.json +29 -0
- package/ios-ci/ios_ci/spm/__init__.py +0 -0
- package/ios-ci/ios_ci/spm/askpass.py +19 -0
- package/ios-ci/ios_ci/spm/spm.py +227 -0
- package/ios-ci/ios_ci/upload_build.py +158 -0
- package/ios-ci/ios_ci/version.py +14 -0
- package/ios-ci/poetry.lock +342 -0
- package/ios-ci/pyproject.toml +26 -0
- package/ios-ci/scripts.py +9 -0
- package/ios-ci/tests/__init__.py +0 -0
- package/ios-ci/tests/podspec/fixtures/BTDevice.podspec +17 -0
- package/ios-ci/tests/podspec/fixtures/BTDeviceBeta.podspec +17 -0
- package/ios-ci/tests/podspec/fixtures/DocumentReaderBeta_RegulaCommon_Beta.podspec +19 -0
- package/ios-ci/tests/podspec/fixtures/DocumentReaderBeta_RegulaCommon_Release.podspec +19 -0
- package/ios-ci/tests/podspec/fixtures/DocumentReaderFullRFID.podspec +17 -0
- package/ios-ci/tests/podspec/fixtures/DocumentReaderFullRFIDBeta.podspec +17 -0
- package/ios-ci/tests/podspec/fixtures/DocumentReader_RegulaCommon_Beta.podspec +19 -0
- package/ios-ci/tests/podspec/fixtures/DocumentReader_RegulaCommon_Release.podspec +19 -0
- package/ios-ci/tests/podspec/fixtures/FaceSDK.podspec +18 -0
- package/ios-ci/tests/podspec/fixtures/FaceSDKBeta.podspec +18 -0
- package/ios-ci/tests/podspec/fixtures/IRS.podspec +17 -0
- package/ios-ci/tests/podspec/fixtures/IRSBeta.podspec +17 -0
- package/ios-ci/tests/podspec/fixtures/RegulaCommon.podspec +17 -0
- package/ios-ci/tests/podspec/fixtures/RegulaCommonBeta.podspec +17 -0
- package/ios-ci/tests/podspec/test_podspec.py +188 -0
- package/ios-ci/tests/test_build_index.py +117 -0
- package/ios-ci/tests/test_dependency.py +139 -0
- package/ios-ci/tests/test_ios_ci.py +5 -0
- package/package.json +36 -0
- package/plugin.xml +48 -0
- package/www/capacitor/customization/camera_position.js +4 -0
- package/www/capacitor/customization/customization.js +66 -0
- package/www/capacitor/customization/customization_colors.js +233 -0
- package/www/capacitor/customization/customization_fonts.js +106 -0
- package/www/capacitor/customization/customization_images.js +129 -0
- package/www/capacitor/customization/font.js +23 -0
- package/www/capacitor/customization/screen_orientation.js +4 -0
- package/www/capacitor/detect_faces/detect_face_result.js +38 -0
- package/www/capacitor/detect_faces/detect_faces_attribute.js +15 -0
- package/www/capacitor/detect_faces/detect_faces_attribute_result.js +20 -0
- package/www/capacitor/detect_faces/detect_faces_backend_exception.js +23 -0
- package/www/capacitor/detect_faces/detect_faces_config.js +14 -0
- package/www/capacitor/detect_faces/detect_faces_exception.js +30 -0
- package/www/capacitor/detect_faces/detect_faces_request.js +67 -0
- package/www/capacitor/detect_faces/detect_faces_response.js +24 -0
- package/www/capacitor/detect_faces/detect_faces_scenario.js +10 -0
- package/www/capacitor/face_capture/face_capture_config.js +28 -0
- package/www/capacitor/face_capture/face_capture_exception.js +25 -0
- package/www/capacitor/face_capture/face_capture_image.js +26 -0
- package/www/capacitor/face_capture/face_capture_response.js +17 -0
- package/www/capacitor/image_params/output_image_crop.js +21 -0
- package/www/capacitor/image_params/output_image_params.js +9 -0
- package/www/capacitor/image_params/point.js +14 -0
- package/www/capacitor/image_params/rect.js +18 -0
- package/www/capacitor/image_params/size.js +9 -0
- package/www/capacitor/image_quality/image_quality_characteristic.js +24 -0
- package/www/capacitor/image_quality/image_quality_characteristic_name.js +58 -0
- package/www/capacitor/image_quality/image_quality_group.js +332 -0
- package/www/capacitor/image_quality/image_quality_range.js +26 -0
- package/www/capacitor/image_quality/image_quality_result.js +40 -0
- package/www/capacitor/index.js +219 -0
- package/www/capacitor/init/face_sdk_version.js +16 -0
- package/www/capacitor/init/init_config.js +9 -0
- package/www/capacitor/init/init_exception.js +29 -0
- package/www/capacitor/init/license_exception.js +29 -0
- package/www/capacitor/internal/bridge.js +39 -0
- package/www/capacitor/internal/cordova.js +17 -0
- package/www/capacitor/internal/webpack.config.js +11 -0
- package/www/capacitor/liveness/liveness_backend_exception.js +38 -0
- package/www/capacitor/liveness/liveness_config.js +54 -0
- package/www/capacitor/liveness/liveness_exception.js +35 -0
- package/www/capacitor/liveness/liveness_notification.js +34 -0
- package/www/capacitor/liveness/liveness_response.js +30 -0
- package/www/capacitor/match_faces/compared_face.js +21 -0
- package/www/capacitor/match_faces/compared_faces_pair.js +23 -0
- package/www/capacitor/match_faces/compared_faces_split.js +22 -0
- package/www/capacitor/match_faces/match_faces_backend_exception.js +14 -0
- package/www/capacitor/match_faces/match_faces_config.js +12 -0
- package/www/capacitor/match_faces/match_faces_detection.js +25 -0
- package/www/capacitor/match_faces/match_faces_detection_face.js +28 -0
- package/www/capacitor/match_faces/match_faces_exception.js +30 -0
- package/www/capacitor/match_faces/match_faces_image.js +25 -0
- package/www/capacitor/match_faces/match_faces_request.js +13 -0
- package/www/capacitor/match_faces/match_faces_response.js +28 -0
- package/www/capacitor/person_database/edit_group_persons_request.js +9 -0
- package/www/capacitor/person_database/image_upload.js +16 -0
- package/www/capacitor/person_database/pageable_item_list.js +22 -0
- package/www/capacitor/person_database/person.js +22 -0
- package/www/capacitor/person_database/person_database.js +145 -0
- package/www/capacitor/person_database/person_group.js +18 -0
- package/www/capacitor/person_database/person_image.js +22 -0
- package/www/capacitor/person_database/search_person.js +31 -0
- package/www/capacitor/person_database/search_person_detection.js +22 -0
- package/www/capacitor/person_database/search_person_image.js +26 -0
- package/www/capacitor/person_database/search_person_request.js +17 -0
- package/www/cordova.js +3738 -0
- package/www/react-native/customization/camera_position.js +4 -0
- package/www/react-native/customization/customization.js +66 -0
- package/www/react-native/customization/customization_colors.js +233 -0
- package/www/react-native/customization/customization_fonts.js +106 -0
- package/www/react-native/customization/customization_images.js +129 -0
- package/www/react-native/customization/font.js +23 -0
- package/www/react-native/customization/screen_orientation.js +4 -0
- package/www/react-native/detect_faces/detect_face_result.js +38 -0
- package/www/react-native/detect_faces/detect_faces_attribute.js +15 -0
- package/www/react-native/detect_faces/detect_faces_attribute_result.js +20 -0
- package/www/react-native/detect_faces/detect_faces_backend_exception.js +23 -0
- package/www/react-native/detect_faces/detect_faces_config.js +14 -0
- package/www/react-native/detect_faces/detect_faces_exception.js +30 -0
- package/www/react-native/detect_faces/detect_faces_request.js +67 -0
- package/www/react-native/detect_faces/detect_faces_response.js +24 -0
- package/www/react-native/detect_faces/detect_faces_scenario.js +10 -0
- package/www/react-native/face_capture/face_capture_config.js +28 -0
- package/www/react-native/face_capture/face_capture_exception.js +25 -0
- package/www/react-native/face_capture/face_capture_image.js +26 -0
- package/www/react-native/face_capture/face_capture_response.js +17 -0
- package/www/react-native/image_params/output_image_crop.js +21 -0
- package/www/react-native/image_params/output_image_params.js +9 -0
- package/www/react-native/image_params/point.js +14 -0
- package/www/react-native/image_params/rect.js +18 -0
- package/www/react-native/image_params/size.js +9 -0
- package/www/react-native/image_quality/image_quality_characteristic.js +24 -0
- package/www/react-native/image_quality/image_quality_characteristic_name.js +58 -0
- package/www/react-native/image_quality/image_quality_group.js +332 -0
- package/www/react-native/image_quality/image_quality_range.js +26 -0
- package/www/react-native/image_quality/image_quality_result.js +40 -0
- package/www/react-native/index.js +219 -0
- package/www/react-native/init/face_sdk_version.js +16 -0
- package/www/react-native/init/init_config.js +9 -0
- package/www/react-native/init/init_exception.js +29 -0
- package/www/react-native/init/license_exception.js +29 -0
- package/www/react-native/internal/bridge.js +39 -0
- package/www/react-native/liveness/liveness_backend_exception.js +38 -0
- package/www/react-native/liveness/liveness_config.js +54 -0
- package/www/react-native/liveness/liveness_exception.js +35 -0
- package/www/react-native/liveness/liveness_notification.js +34 -0
- package/www/react-native/liveness/liveness_response.js +30 -0
- package/www/react-native/match_faces/compared_face.js +21 -0
- package/www/react-native/match_faces/compared_faces_pair.js +23 -0
- package/www/react-native/match_faces/compared_faces_split.js +22 -0
- package/www/react-native/match_faces/match_faces_backend_exception.js +14 -0
- package/www/react-native/match_faces/match_faces_config.js +12 -0
- package/www/react-native/match_faces/match_faces_detection.js +25 -0
- package/www/react-native/match_faces/match_faces_detection_face.js +28 -0
- package/www/react-native/match_faces/match_faces_exception.js +30 -0
- package/www/react-native/match_faces/match_faces_image.js +25 -0
- package/www/react-native/match_faces/match_faces_request.js +13 -0
- package/www/react-native/match_faces/match_faces_response.js +28 -0
- package/www/react-native/person_database/edit_group_persons_request.js +9 -0
- package/www/react-native/person_database/image_upload.js +16 -0
- package/www/react-native/person_database/pageable_item_list.js +22 -0
- package/www/react-native/person_database/person.js +22 -0
- package/www/react-native/person_database/person_database.js +145 -0
- package/www/react-native/person_database/person_group.js +18 -0
- package/www/react-native/person_database/person_image.js +22 -0
- package/www/react-native/person_database/search_person.js +31 -0
- package/www/react-native/person_database/search_person_detection.js +22 -0
- package/www/react-native/person_database/search_person_image.js +26 -0
- package/www/react-native/person_database/search_person_request.js +17 -0
- package/www/types/customization/camera_position.d.ts +4 -0
- package/www/types/customization/customization.d.ts +24 -0
- package/www/types/customization/customization_colors.d.ts +31 -0
- package/www/types/customization/customization_fonts.d.ts +17 -0
- package/www/types/customization/customization_images.d.ts +18 -0
- package/www/types/customization/font.d.ts +14 -0
- package/www/types/customization/screen_orientation.d.ts +4 -0
- package/www/types/detect_faces/detect_face_result.d.ts +16 -0
- package/www/types/detect_faces/detect_faces_attribute.d.ts +15 -0
- package/www/types/detect_faces/detect_faces_attribute_result.d.ts +11 -0
- package/www/types/detect_faces/detect_faces_backend_exception.d.ts +15 -0
- package/www/types/detect_faces/detect_faces_config.d.ts +19 -0
- package/www/types/detect_faces/detect_faces_exception.d.ts +21 -0
- package/www/types/detect_faces/detect_faces_request.d.ts +27 -0
- package/www/types/detect_faces/detect_faces_response.d.ts +12 -0
- package/www/types/detect_faces/detect_faces_scenario.d.ts +10 -0
- package/www/types/face_capture/face_capture_config.d.ts +30 -0
- package/www/types/face_capture/face_capture_exception.d.ts +17 -0
- package/www/types/face_capture/face_capture_image.d.ts +15 -0
- package/www/types/face_capture/face_capture_response.d.ts +9 -0
- package/www/types/image_params/output_image_crop.d.ts +25 -0
- package/www/types/image_params/output_image_params.d.ts +13 -0
- package/www/types/image_params/point.d.ts +6 -0
- package/www/types/image_params/rect.d.ts +8 -0
- package/www/types/image_params/size.d.ts +6 -0
- package/www/types/image_quality/image_quality_characteristic.d.ts +4 -0
- package/www/types/image_quality/image_quality_characteristic_name.d.ts +58 -0
- package/www/types/image_quality/image_quality_group.d.ts +155 -0
- package/www/types/image_quality/image_quality_range.d.ts +8 -0
- package/www/types/image_quality/image_quality_result.d.ts +30 -0
- package/www/types/index.d.ts +159 -0
- package/www/types/init/face_sdk_version.d.ts +7 -0
- package/www/types/init/init_config.d.ts +7 -0
- package/www/types/init/init_exception.d.ts +20 -0
- package/www/types/init/license_exception.d.ts +21 -0
- package/www/types/liveness/liveness_backend_exception.d.ts +30 -0
- package/www/types/liveness/liveness_config.d.ts +56 -0
- package/www/types/liveness/liveness_exception.d.ts +26 -0
- package/www/types/liveness/liveness_notification.d.ts +28 -0
- package/www/types/liveness/liveness_response.d.ts +18 -0
- package/www/types/match_faces/compared_face.d.ts +11 -0
- package/www/types/match_faces/compared_faces_pair.d.ts +12 -0
- package/www/types/match_faces/compared_faces_split.d.ts +8 -0
- package/www/types/match_faces/match_faces_backend_exception.d.ts +6 -0
- package/www/types/match_faces/match_faces_config.d.ts +14 -0
- package/www/types/match_faces/match_faces_detection.d.ts +12 -0
- package/www/types/match_faces/match_faces_detection_face.d.ts +13 -0
- package/www/types/match_faces/match_faces_exception.d.ts +21 -0
- package/www/types/match_faces/match_faces_image.d.ts +16 -0
- package/www/types/match_faces/match_faces_request.d.ts +18 -0
- package/www/types/match_faces/match_faces_response.d.ts +12 -0
- package/www/types/person_database/edit_group_persons_request.d.ts +8 -0
- package/www/types/person_database/image_upload.d.ts +6 -0
- package/www/types/person_database/pageable_item_list.d.ts +7 -0
- package/www/types/person_database/person.d.ts +10 -0
- package/www/types/person_database/person_database.d.ts +92 -0
- package/www/types/person_database/person_group.d.ts +8 -0
- package/www/types/person_database/person_image.d.ts +10 -0
- package/www/types/person_database/search_person.d.ts +15 -0
- package/www/types/person_database/search_person_detection.d.ts +11 -0
- package/www/types/person_database/search_person_image.d.ts +12 -0
- package/www/types/person_database/search_person_request.d.ts +15 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react'
|
|
2
|
+
import { launchImageLibrary } from 'react-native-image-picker'
|
|
3
|
+
import * as RNFS from 'react-native-fs'
|
|
4
|
+
import { SafeAreaView, StyleSheet, Text, View, TouchableOpacity, Image, Button, Platform, Alert } from 'react-native'
|
|
5
|
+
import { FaceSDK, MatchFacesRequest, MatchFacesImage, InitConfig, LivenessSkipStep, ImageType, LivenessStatus, LivenessConfig } from '@regulaforensics/face-sdk'
|
|
6
|
+
|
|
7
|
+
async function init() {
|
|
8
|
+
if (!await initialize()) return
|
|
9
|
+
setStatus("Ready")
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
async function startLiveness() {
|
|
13
|
+
var response = await faceSdk.startLiveness({
|
|
14
|
+
config: new LivenessConfig({
|
|
15
|
+
skipStep: [LivenessSkipStep.ONBOARDING_STEP]
|
|
16
|
+
}),
|
|
17
|
+
notificationCompletion: (notification) => {
|
|
18
|
+
console.log("LivenessStatus: " + notification.status)
|
|
19
|
+
}
|
|
20
|
+
})
|
|
21
|
+
if (response.image == null) return
|
|
22
|
+
setImage(response.image, ImageType.LIVE, 1)
|
|
23
|
+
setLivenessStatus(response.liveness == LivenessStatus.PASSED ? "passed" : "unknown")
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
async function matchFaces() {
|
|
27
|
+
if (image1 == null || image2 == null) {
|
|
28
|
+
setStatus("Both images required!")
|
|
29
|
+
return
|
|
30
|
+
}
|
|
31
|
+
setStatus("Processing...")
|
|
32
|
+
var request = new MatchFacesRequest([image1, image2])
|
|
33
|
+
var response = await faceSdk.matchFaces(request)
|
|
34
|
+
var split = await faceSdk.splitComparedFaces(response.results, 0.75)
|
|
35
|
+
var match = split.matchedFaces
|
|
36
|
+
setSimilarityStatus("failed")
|
|
37
|
+
if (match.length > 0)
|
|
38
|
+
setSimilarityStatus((match[0].similarity * 100).toFixed(2) + "%")
|
|
39
|
+
setStatus("Ready")
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function clearResults() {
|
|
43
|
+
setStatus("Ready")
|
|
44
|
+
setSimilarityStatus("null")
|
|
45
|
+
setLivenessStatus("null")
|
|
46
|
+
resetImages()
|
|
47
|
+
image1 = null
|
|
48
|
+
image2 = null
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// If 'regula.license' exists, init using license(enables offline match)
|
|
52
|
+
// otherwise init without license.
|
|
53
|
+
async function initialize() {
|
|
54
|
+
setStatus("Initializing...")
|
|
55
|
+
var license = await loadAssetIfExists("regula.license")
|
|
56
|
+
var config: InitConfig | undefined
|
|
57
|
+
if (license != null) config = new InitConfig(license)
|
|
58
|
+
var [success, error] = await faceSdk.initialize({ config: config })
|
|
59
|
+
if (!success && error != null) {
|
|
60
|
+
setStatus(error.message)
|
|
61
|
+
console.log(error.code + ": " + error.message)
|
|
62
|
+
}
|
|
63
|
+
return success
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function setImage(base64: string, type: number, position: number) {
|
|
67
|
+
setSimilarityStatus("null")
|
|
68
|
+
var mfImage = new MatchFacesImage(base64, type)
|
|
69
|
+
if (position == 1) {
|
|
70
|
+
image1 = mfImage
|
|
71
|
+
setUiImage1("data:image/png;base64," + base64)
|
|
72
|
+
setLivenessStatus("null")
|
|
73
|
+
}
|
|
74
|
+
if (position == 2) {
|
|
75
|
+
image2 = mfImage
|
|
76
|
+
setUiImage2("data:image/png;base64," + base64)
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
async function useCamera(position: number) {
|
|
81
|
+
var response = await faceSdk.startFaceCapture()
|
|
82
|
+
if (response.image == null) return
|
|
83
|
+
var image = response.image
|
|
84
|
+
setImage(image.image, image.imageType, position)
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function useGallery(position: number) {
|
|
88
|
+
launchImageLibrary({
|
|
89
|
+
mediaType: 'photo',
|
|
90
|
+
selectionLimit: 1,
|
|
91
|
+
includeBase64: true
|
|
92
|
+
}, (response: any) => {
|
|
93
|
+
if (response.assets == null) return
|
|
94
|
+
setImage(response.assets[0].base64!, ImageType.PRINTED, position)
|
|
95
|
+
})
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function pickImage(position: number) {
|
|
99
|
+
Alert.alert("Select option", "", [
|
|
100
|
+
{ text: "Use gallery", onPress: () => useGallery(position) },
|
|
101
|
+
{ text: "Use camera", onPress: () => useCamera(position) }
|
|
102
|
+
], { cancelable: true })
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
async function loadAssetIfExists(path: string): Promise<string | null> {
|
|
106
|
+
if (Platform.OS === 'ios') path = RNFS.MainBundlePath + "/license/" + path
|
|
107
|
+
var readFile = Platform.OS === 'ios' ? RNFS.readFile : RNFS.readFileAssets
|
|
108
|
+
try {
|
|
109
|
+
return await readFile(path, 'base64')
|
|
110
|
+
} catch {
|
|
111
|
+
return null
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
var faceSdk = FaceSDK.instance
|
|
116
|
+
|
|
117
|
+
var image1: MatchFacesImage | null
|
|
118
|
+
var image2: MatchFacesImage | null
|
|
119
|
+
|
|
120
|
+
var status: string, similarityStatus: string, livenessStatus: string
|
|
121
|
+
|
|
122
|
+
var setStatus: (val: string) => void
|
|
123
|
+
var setSimilarityStatus: (val: string) => void
|
|
124
|
+
var setLivenessStatus: (val: string) => void
|
|
125
|
+
var setUiImage1: (val: string) => void
|
|
126
|
+
var setUiImage2: (val: string) => void
|
|
127
|
+
var resetImages = () => {
|
|
128
|
+
setUiImage1(require('./images/portrait.png'))
|
|
129
|
+
setUiImage2(require('./images/portrait.png'))
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
const App: () => React.JSX.Element = () => {
|
|
133
|
+
const imageSetter = (originalSetter: (value: any) => void) => (val: any) => {
|
|
134
|
+
if (typeof (val) == 'string') originalSetter({ uri: val })
|
|
135
|
+
else originalSetter(val)
|
|
136
|
+
}
|
|
137
|
+
[status, setStatus] = useState<string>("");
|
|
138
|
+
[similarityStatus, setSimilarityStatus] = useState<string>("null");
|
|
139
|
+
[livenessStatus, setLivenessStatus] = useState<string>("null");
|
|
140
|
+
const [uiImage1, setUiImage1Original] = useState<any>(require('./images/portrait.png'));
|
|
141
|
+
const [uiImage2, setUiImage2Original] = useState<any>(require('./images/portrait.png'));
|
|
142
|
+
setUiImage1 = imageSetter(setUiImage1Original)
|
|
143
|
+
setUiImage2 = imageSetter(setUiImage2Original)
|
|
144
|
+
|
|
145
|
+
useEffect(() => {
|
|
146
|
+
init()
|
|
147
|
+
return () => {
|
|
148
|
+
faceSdk.deinitialize()
|
|
149
|
+
clearResults()
|
|
150
|
+
}
|
|
151
|
+
}, [])
|
|
152
|
+
|
|
153
|
+
return (
|
|
154
|
+
<SafeAreaView style={styles.body}>
|
|
155
|
+
<Text style={styles.title}>{status}</Text>
|
|
156
|
+
|
|
157
|
+
<View style={styles.container}>
|
|
158
|
+
<MyImage image={uiImage1} onPress={() => pickImage(1)} />
|
|
159
|
+
<MyImage image={uiImage2} onPress={() => pickImage(2)} />
|
|
160
|
+
|
|
161
|
+
<View style={{ padding: 10 }} />
|
|
162
|
+
<MyButton text="Match" onPress={() => { matchFaces() }} />
|
|
163
|
+
<MyButton text="Liveness" onPress={() => { startLiveness() }} />
|
|
164
|
+
<MyButton text="Clear" onPress={() => { clearResults() }} />
|
|
165
|
+
|
|
166
|
+
<View style={{ flexDirection: 'row', padding: 20 }}>
|
|
167
|
+
<Text style={{ padding: 10 }}>Similarity: {similarityStatus}</Text>
|
|
168
|
+
<Text style={{ padding: 10 }}>Liveness: {livenessStatus}</Text>
|
|
169
|
+
</View>
|
|
170
|
+
</View>
|
|
171
|
+
</SafeAreaView>
|
|
172
|
+
)
|
|
173
|
+
}
|
|
174
|
+
export default App
|
|
175
|
+
|
|
176
|
+
function MyImage({ image, onPress }: any): React.JSX.Element {
|
|
177
|
+
return <TouchableOpacity onPress={onPress}>
|
|
178
|
+
<Image source={image} resizeMode="contain" style={{ height: 150, width: 200, padding: 5 }} />
|
|
179
|
+
</TouchableOpacity>
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function MyButton({ text, onPress }: any): React.JSX.Element {
|
|
183
|
+
return <View style={{ padding: 5 }}>
|
|
184
|
+
<Button title={text} color="#4285F4" onPress={onPress} />
|
|
185
|
+
</View>
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
const styles = StyleSheet.create({
|
|
189
|
+
body: {
|
|
190
|
+
width: '100%',
|
|
191
|
+
height: '100%',
|
|
192
|
+
alignItems: 'center',
|
|
193
|
+
backgroundColor: '#F5FCFF',
|
|
194
|
+
},
|
|
195
|
+
title: {
|
|
196
|
+
fontSize: 30,
|
|
197
|
+
paddingTop: 30
|
|
198
|
+
},
|
|
199
|
+
container: {
|
|
200
|
+
flex: 1,
|
|
201
|
+
justifyContent: 'center',
|
|
202
|
+
alignItems: 'center',
|
|
203
|
+
backgroundColor: '#F5FCFF',
|
|
204
|
+
paddingBottom: 50
|
|
205
|
+
},
|
|
206
|
+
})
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
source 'https://rubygems.org'
|
|
2
|
+
|
|
3
|
+
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
|
|
4
|
+
ruby ">= 2.6.10"
|
|
5
|
+
|
|
6
|
+
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
|
|
7
|
+
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
|
|
8
|
+
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
GEM
|
|
2
|
+
remote: https://rubygems.org/
|
|
3
|
+
specs:
|
|
4
|
+
CFPropertyList (3.0.7)
|
|
5
|
+
base64
|
|
6
|
+
nkf
|
|
7
|
+
rexml
|
|
8
|
+
activesupport (7.2.1)
|
|
9
|
+
base64
|
|
10
|
+
bigdecimal
|
|
11
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
12
|
+
connection_pool (>= 2.2.5)
|
|
13
|
+
drb
|
|
14
|
+
i18n (>= 1.6, < 2)
|
|
15
|
+
logger (>= 1.4.2)
|
|
16
|
+
minitest (>= 5.1)
|
|
17
|
+
securerandom (>= 0.3)
|
|
18
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
|
19
|
+
addressable (2.8.7)
|
|
20
|
+
public_suffix (>= 2.0.2, < 7.0)
|
|
21
|
+
algoliasearch (1.27.5)
|
|
22
|
+
httpclient (~> 2.8, >= 2.8.3)
|
|
23
|
+
json (>= 1.5.1)
|
|
24
|
+
atomos (0.1.3)
|
|
25
|
+
base64 (0.2.0)
|
|
26
|
+
bigdecimal (3.1.8)
|
|
27
|
+
claide (1.1.0)
|
|
28
|
+
cocoapods (1.15.2)
|
|
29
|
+
addressable (~> 2.8)
|
|
30
|
+
claide (>= 1.0.2, < 2.0)
|
|
31
|
+
cocoapods-core (= 1.15.2)
|
|
32
|
+
cocoapods-deintegrate (>= 1.0.3, < 2.0)
|
|
33
|
+
cocoapods-downloader (>= 2.1, < 3.0)
|
|
34
|
+
cocoapods-plugins (>= 1.0.0, < 2.0)
|
|
35
|
+
cocoapods-search (>= 1.0.0, < 2.0)
|
|
36
|
+
cocoapods-trunk (>= 1.6.0, < 2.0)
|
|
37
|
+
cocoapods-try (>= 1.1.0, < 2.0)
|
|
38
|
+
colored2 (~> 3.1)
|
|
39
|
+
escape (~> 0.0.4)
|
|
40
|
+
fourflusher (>= 2.3.0, < 3.0)
|
|
41
|
+
gh_inspector (~> 1.0)
|
|
42
|
+
molinillo (~> 0.8.0)
|
|
43
|
+
nap (~> 1.0)
|
|
44
|
+
ruby-macho (>= 2.3.0, < 3.0)
|
|
45
|
+
xcodeproj (>= 1.23.0, < 2.0)
|
|
46
|
+
cocoapods-core (1.15.2)
|
|
47
|
+
activesupport (>= 5.0, < 8)
|
|
48
|
+
addressable (~> 2.8)
|
|
49
|
+
algoliasearch (~> 1.0)
|
|
50
|
+
concurrent-ruby (~> 1.1)
|
|
51
|
+
fuzzy_match (~> 2.0.4)
|
|
52
|
+
nap (~> 1.0)
|
|
53
|
+
netrc (~> 0.11)
|
|
54
|
+
public_suffix (~> 4.0)
|
|
55
|
+
typhoeus (~> 1.0)
|
|
56
|
+
cocoapods-deintegrate (1.0.5)
|
|
57
|
+
cocoapods-downloader (2.1)
|
|
58
|
+
cocoapods-plugins (1.0.0)
|
|
59
|
+
nap
|
|
60
|
+
cocoapods-search (1.0.1)
|
|
61
|
+
cocoapods-trunk (1.6.0)
|
|
62
|
+
nap (>= 0.8, < 2.0)
|
|
63
|
+
netrc (~> 0.11)
|
|
64
|
+
cocoapods-try (1.2.0)
|
|
65
|
+
colored2 (3.1.2)
|
|
66
|
+
concurrent-ruby (1.3.4)
|
|
67
|
+
connection_pool (2.4.1)
|
|
68
|
+
drb (2.2.1)
|
|
69
|
+
escape (0.0.4)
|
|
70
|
+
ethon (0.16.0)
|
|
71
|
+
ffi (>= 1.15.0)
|
|
72
|
+
ffi (1.17.0)
|
|
73
|
+
ffi (1.17.0-aarch64-linux-gnu)
|
|
74
|
+
ffi (1.17.0-aarch64-linux-musl)
|
|
75
|
+
ffi (1.17.0-arm-linux-gnu)
|
|
76
|
+
ffi (1.17.0-arm-linux-musl)
|
|
77
|
+
ffi (1.17.0-arm64-darwin)
|
|
78
|
+
ffi (1.17.0-x86-linux-gnu)
|
|
79
|
+
ffi (1.17.0-x86-linux-musl)
|
|
80
|
+
ffi (1.17.0-x86_64-darwin)
|
|
81
|
+
ffi (1.17.0-x86_64-linux-gnu)
|
|
82
|
+
ffi (1.17.0-x86_64-linux-musl)
|
|
83
|
+
fourflusher (2.3.1)
|
|
84
|
+
fuzzy_match (2.0.4)
|
|
85
|
+
gh_inspector (1.1.3)
|
|
86
|
+
httpclient (2.8.3)
|
|
87
|
+
i18n (1.14.6)
|
|
88
|
+
concurrent-ruby (~> 1.0)
|
|
89
|
+
json (2.7.2)
|
|
90
|
+
logger (1.6.1)
|
|
91
|
+
minitest (5.25.1)
|
|
92
|
+
molinillo (0.8.0)
|
|
93
|
+
nanaimo (0.3.0)
|
|
94
|
+
nap (1.1.0)
|
|
95
|
+
netrc (0.11.0)
|
|
96
|
+
nkf (0.2.0)
|
|
97
|
+
public_suffix (4.0.7)
|
|
98
|
+
rexml (3.3.7)
|
|
99
|
+
ruby-macho (2.5.1)
|
|
100
|
+
securerandom (0.3.1)
|
|
101
|
+
typhoeus (1.4.1)
|
|
102
|
+
ethon (>= 0.9.0)
|
|
103
|
+
tzinfo (2.0.6)
|
|
104
|
+
concurrent-ruby (~> 1.0)
|
|
105
|
+
xcodeproj (1.25.0)
|
|
106
|
+
CFPropertyList (>= 2.3.3, < 4.0)
|
|
107
|
+
atomos (~> 0.1.3)
|
|
108
|
+
claide (>= 1.0.2, < 2.0)
|
|
109
|
+
colored2 (~> 3.1)
|
|
110
|
+
nanaimo (~> 0.3.0)
|
|
111
|
+
rexml (>= 3.3.2, < 4.0)
|
|
112
|
+
|
|
113
|
+
PLATFORMS
|
|
114
|
+
aarch64-linux-gnu
|
|
115
|
+
aarch64-linux-musl
|
|
116
|
+
arm-linux-gnu
|
|
117
|
+
arm-linux-musl
|
|
118
|
+
arm64-darwin
|
|
119
|
+
ruby
|
|
120
|
+
x86-linux-gnu
|
|
121
|
+
x86-linux-musl
|
|
122
|
+
x86_64-darwin
|
|
123
|
+
x86_64-linux-gnu
|
|
124
|
+
x86_64-linux-musl
|
|
125
|
+
|
|
126
|
+
DEPENDENCIES
|
|
127
|
+
activesupport (>= 6.1.7.5, != 7.1.0)
|
|
128
|
+
cocoapods (>= 1.13, != 1.15.1, != 1.15.0)
|
|
129
|
+
|
|
130
|
+
RUBY VERSION
|
|
131
|
+
ruby 3.3.5p100
|
|
132
|
+
|
|
133
|
+
BUNDLED WITH
|
|
134
|
+
2.5.19
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
apply plugin: "com.android.application"
|
|
2
|
+
apply plugin: "org.jetbrains.kotlin.android"
|
|
3
|
+
apply plugin: "com.facebook.react"
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* This is the configuration block to customize your React Native Android app.
|
|
7
|
+
* By default you don't need to apply any configuration, just uncomment the lines you need.
|
|
8
|
+
*/
|
|
9
|
+
react {
|
|
10
|
+
/* Folders */
|
|
11
|
+
// The root of your project, i.e. where "package.json" lives. Default is '../..'
|
|
12
|
+
// root = file("../../")
|
|
13
|
+
// The folder where the react-native NPM package is. Default is ../../node_modules/react-native
|
|
14
|
+
// reactNativeDir = file("../../node_modules/react-native")
|
|
15
|
+
// The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen
|
|
16
|
+
// codegenDir = file("../../node_modules/@react-native/codegen")
|
|
17
|
+
// The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js
|
|
18
|
+
// cliFile = file("../../node_modules/react-native/cli.js")
|
|
19
|
+
|
|
20
|
+
/* Variants */
|
|
21
|
+
// The list of variants to that are debuggable. For those we're going to
|
|
22
|
+
// skip the bundling of the JS bundle and the assets. By default is just 'debug'.
|
|
23
|
+
// If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
|
|
24
|
+
// debuggableVariants = ["liteDebug", "prodDebug"]
|
|
25
|
+
|
|
26
|
+
/* Bundling */
|
|
27
|
+
// A list containing the node command and its flags. Default is just 'node'.
|
|
28
|
+
// nodeExecutableAndArgs = ["node"]
|
|
29
|
+
//
|
|
30
|
+
// The command to run when bundling. By default is 'bundle'
|
|
31
|
+
// bundleCommand = "ram-bundle"
|
|
32
|
+
//
|
|
33
|
+
// The path to the CLI configuration file. Default is empty.
|
|
34
|
+
// bundleConfig = file(../rn-cli.config.js)
|
|
35
|
+
//
|
|
36
|
+
// The name of the generated asset file containing your JS bundle
|
|
37
|
+
// bundleAssetName = "MyApplication.android.bundle"
|
|
38
|
+
//
|
|
39
|
+
// The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
|
|
40
|
+
// entryFile = file("../js/MyApplication.android.js")
|
|
41
|
+
//
|
|
42
|
+
// A list of extra flags to pass to the 'bundle' commands.
|
|
43
|
+
// See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
|
|
44
|
+
// extraPackagerArgs = []
|
|
45
|
+
|
|
46
|
+
/* Hermes Commands */
|
|
47
|
+
// The hermes compiler command to run. By default it is 'hermesc'
|
|
48
|
+
// hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
|
|
49
|
+
//
|
|
50
|
+
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
|
|
51
|
+
// hermesFlags = ["-O", "-output-source-map"]
|
|
52
|
+
|
|
53
|
+
/* Autolinking */
|
|
54
|
+
autolinkLibrariesWithApp()
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
|
|
59
|
+
*/
|
|
60
|
+
def enableProguardInReleaseBuilds = false
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The preferred build flavor of JavaScriptCore (JSC)
|
|
64
|
+
*
|
|
65
|
+
* For example, to use the international variant, you can use:
|
|
66
|
+
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
|
|
67
|
+
*
|
|
68
|
+
* The international variant includes ICU i18n library and necessary data
|
|
69
|
+
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
|
|
70
|
+
* give correct results when using with locales other than en-US. Note that
|
|
71
|
+
* this variant is about 6MiB larger per architecture than default.
|
|
72
|
+
*/
|
|
73
|
+
def jscFlavor = 'org.webkit:android-jsc:+'
|
|
74
|
+
|
|
75
|
+
android {
|
|
76
|
+
ndkVersion rootProject.ext.ndkVersion
|
|
77
|
+
buildToolsVersion rootProject.ext.buildToolsVersion
|
|
78
|
+
compileSdk rootProject.ext.compileSdkVersion
|
|
79
|
+
|
|
80
|
+
namespace "com.regula.face.api"
|
|
81
|
+
defaultConfig {
|
|
82
|
+
applicationId "com.regula.face.api"
|
|
83
|
+
minSdkVersion rootProject.ext.minSdkVersion
|
|
84
|
+
targetSdkVersion rootProject.ext.targetSdkVersion
|
|
85
|
+
versionCode 1
|
|
86
|
+
versionName "1.0"
|
|
87
|
+
}
|
|
88
|
+
signingConfigs {
|
|
89
|
+
debug {
|
|
90
|
+
storeFile file('debug.keystore')
|
|
91
|
+
storePassword 'android'
|
|
92
|
+
keyAlias 'androiddebugkey'
|
|
93
|
+
keyPassword 'android'
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
buildTypes {
|
|
97
|
+
debug {
|
|
98
|
+
signingConfig signingConfigs.debug
|
|
99
|
+
}
|
|
100
|
+
release {
|
|
101
|
+
// Caution! In production, you need to generate your own keystore file.
|
|
102
|
+
// see https://reactnative.dev/docs/signed-apk-android.
|
|
103
|
+
signingConfig signingConfigs.debug
|
|
104
|
+
minifyEnabled enableProguardInReleaseBuilds
|
|
105
|
+
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
aaptOptions {
|
|
110
|
+
noCompress "Regula/faceSdkResource.dat"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
dependencies {
|
|
115
|
+
// The version of react-native is set by the React Native Gradle Plugin
|
|
116
|
+
implementation("com.facebook.react:react-android")
|
|
117
|
+
|
|
118
|
+
if (hermesEnabled.toBoolean()) {
|
|
119
|
+
implementation("com.facebook.react:hermes-android")
|
|
120
|
+
} else {
|
|
121
|
+
implementation jscFlavor
|
|
122
|
+
}
|
|
123
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,10 @@
|
|
|
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:
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
<application
|
|
6
|
+
android:usesCleartextTraffic="true"
|
|
7
|
+
tools:targetApi="28"
|
|
8
|
+
tools:ignore="GoogleAppIndexingWarning"/>
|
|
9
|
+
</manifest>
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
android:supportsRtl="true">
|
|
13
|
+
<activity
|
|
14
|
+
android:name=".MainActivity"
|
|
15
|
+
android:label="@string/app_name"
|
|
16
|
+
android:screenOrientation="portrait"
|
|
17
|
+
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
|
|
18
|
+
android:launchMode="singleTask"
|
|
19
|
+
android:windowSoftInputMode="adjustResize"
|
|
20
|
+
android:exported="true">
|
|
21
|
+
<intent-filter>
|
|
22
|
+
<action android:name="android.intent.action.MAIN" />
|
|
23
|
+
<category android:name="android.intent.category.LAUNCHER" />
|
|
24
|
+
</intent-filter>
|
|
25
|
+
</activity>
|
|
26
|
+
</application>
|
|
27
|
+
</manifest>
|
|
File without changes
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
package com.regula.face.api
|
|
2
|
+
|
|
3
|
+
import com.facebook.react.ReactActivity
|
|
4
|
+
import com.facebook.react.ReactActivityDelegate
|
|
5
|
+
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
|
|
6
|
+
import com.facebook.react.defaults.DefaultReactActivityDelegate
|
|
7
|
+
|
|
8
|
+
class MainActivity : ReactActivity() {
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Returns the name of the main component registered from JavaScript. This is used to schedule
|
|
12
|
+
* rendering of the component.
|
|
13
|
+
*/
|
|
14
|
+
override fun getMainComponentName(): String = "FaceSDK"
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
|
|
18
|
+
* which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
|
|
19
|
+
*/
|
|
20
|
+
override fun createReactActivityDelegate(): ReactActivityDelegate =
|
|
21
|
+
DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
|
|
22
|
+
}
|
package/examples/react-native/android/app/src/main/java/com/regula/face/api/MainApplication.kt
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
package com.regula.face.api
|
|
2
|
+
|
|
3
|
+
import android.app.Application
|
|
4
|
+
import com.facebook.react.PackageList
|
|
5
|
+
import com.facebook.react.ReactApplication
|
|
6
|
+
import com.facebook.react.ReactHost
|
|
7
|
+
import com.facebook.react.ReactNativeHost
|
|
8
|
+
import com.facebook.react.ReactPackage
|
|
9
|
+
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
|
|
10
|
+
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
|
|
11
|
+
import com.facebook.react.defaults.DefaultReactNativeHost
|
|
12
|
+
import com.facebook.soloader.SoLoader
|
|
13
|
+
|
|
14
|
+
class MainApplication : Application(), ReactApplication {
|
|
15
|
+
|
|
16
|
+
override val reactNativeHost: ReactNativeHost =
|
|
17
|
+
object : DefaultReactNativeHost(this) {
|
|
18
|
+
override fun getPackages(): List<ReactPackage> =
|
|
19
|
+
PackageList(this).packages.apply {
|
|
20
|
+
// Packages that cannot be autolinked yet can be added manually here, for example:
|
|
21
|
+
// add(MyReactNativePackage())
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
override fun getJSMainModuleName(): String = "index"
|
|
25
|
+
|
|
26
|
+
override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
|
|
27
|
+
|
|
28
|
+
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
|
|
29
|
+
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
override val reactHost: ReactHost
|
|
33
|
+
get() = getDefaultReactHost(applicationContext, reactNativeHost)
|
|
34
|
+
|
|
35
|
+
override fun onCreate() {
|
|
36
|
+
super.onCreate()
|
|
37
|
+
SoLoader.init(this, false)
|
|
38
|
+
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
|
|
39
|
+
// If you opted-in for the New Architecture, we load the native entry point for this app.
|
|
40
|
+
load()
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Copyright (C) 2014 The Android Open Source Project
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
-->
|
|
16
|
+
<inset xmlns:android="http://schemas.android.com/apk/res/android"
|
|
17
|
+
android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material"
|
|
18
|
+
android:insetRight="@dimen/abc_edit_text_inset_horizontal_material"
|
|
19
|
+
android:insetTop="@dimen/abc_edit_text_inset_top_material"
|
|
20
|
+
android:insetBottom="@dimen/abc_edit_text_inset_bottom_material"
|
|
21
|
+
>
|
|
22
|
+
|
|
23
|
+
<selector>
|
|
24
|
+
<!--
|
|
25
|
+
This file is a copy of abc_edit_text_material (https://bit.ly/3k8fX7I).
|
|
26
|
+
The item below with state_pressed="false" and state_focused="false" causes a NullPointerException.
|
|
27
|
+
NullPointerException:tempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.Drawable$ConstantState.newDrawable(android.content.res.Resources)'
|
|
28
|
+
|
|
29
|
+
<item android:state_pressed="false" android:state_focused="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
|
|
30
|
+
|
|
31
|
+
For more info, see https://bit.ly/3CdLStv (react-native/pull/29452) and https://bit.ly/3nxOMoR.
|
|
32
|
+
-->
|
|
33
|
+
<item android:state_enabled="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
|
|
34
|
+
<item android:drawable="@drawable/abc_textfield_activated_mtrl_alpha"/>
|
|
35
|
+
</selector>
|
|
36
|
+
|
|
37
|
+
</inset>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<resources>
|
|
2
|
+
|
|
3
|
+
<!-- Base application theme. -->
|
|
4
|
+
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
|
|
5
|
+
<!-- Customize your theme here. -->
|
|
6
|
+
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
|
|
7
|
+
</style>
|
|
8
|
+
|
|
9
|
+
</resources>
|