diff --git a/android/demo-custom/build.gradle b/android/demo-custom/build.gradle index fcb6e9d..23b05a9 100644 --- a/android/demo-custom/build.gradle +++ b/android/demo-custom/build.gradle @@ -24,7 +24,7 @@ android { } dependencies { - implementation 'com.geniusscansdk:gssdk:5.3.1' + implementation 'com.geniusscansdk:gssdk:5.4.0' implementation 'androidx.appcompat:appcompat:1.7.0' implementation 'com.google.android.material:material:1.12.0' diff --git a/android/demo-simple/build.gradle b/android/demo-simple/build.gradle index 3fe2565..1abb2d2 100644 --- a/android/demo-simple/build.gradle +++ b/android/demo-simple/build.gradle @@ -25,7 +25,7 @@ android { } dependencies { - implementation 'com.geniusscansdk:gssdk:5.3.1' + implementation 'com.geniusscansdk:gssdk:5.4.0' implementation 'androidx.appcompat:appcompat:1.7.0' implementation 'com.google.android.material:material:1.12.0' diff --git a/android/demo-simple/src/main/AndroidManifest.xml b/android/demo-simple/src/main/AndroidManifest.xml index 9bb4096..c8a11dc 100644 --- a/android/demo-simple/src/main/AndroidManifest.xml +++ b/android/demo-simple/src/main/AndroidManifest.xml @@ -14,7 +14,7 @@ diff --git a/android/demo-simple/src/main/java/com/geniusscansdk/simpledemo/MainActivity.java b/android/demo-simple/src/main/java/com/geniusscansdk/simpledemo/MainActivity.java index ad388b6..bbd34b9 100644 --- a/android/demo-simple/src/main/java/com/geniusscansdk/simpledemo/MainActivity.java +++ b/android/demo-simple/src/main/java/com/geniusscansdk/simpledemo/MainActivity.java @@ -1,28 +1,41 @@ package com.geniusscansdk.simpledemo; -import static com.geniusscansdk.scanflow.ScanConfiguration.Filter.*; +import static com.geniusscansdk.scanflow.ScanConfiguration.Filter.AUTOMATIC; +import static com.geniusscansdk.scanflow.ScanConfiguration.Filter.AUTOMATIC_BLACK_AND_WHITE; +import static com.geniusscansdk.scanflow.ScanConfiguration.Filter.AUTOMATIC_COLOR; +import static com.geniusscansdk.scanflow.ScanConfiguration.Filter.NONE; +import static com.geniusscansdk.scanflow.ScanConfiguration.Filter.PHOTO; +import static com.geniusscansdk.scanflow.ScanConfiguration.Filter.SOFT_COLOR; +import static com.geniusscansdk.scanflow.ScanConfiguration.Filter.SOFT_GRAYSCALE; +import static com.geniusscansdk.scanflow.ScanConfiguration.Filter.STRONG_MONOCHROME; import android.app.Activity; -import android.app.AlertDialog; import android.content.Intent; import android.graphics.Color; import android.net.Uri; import android.os.Bundle; import android.util.Log; +import android.view.View; import android.widget.TextView; import androidx.activity.EdgeToEdge; +import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.RawRes; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.Toolbar; import androidx.core.content.ContextCompat; import androidx.core.content.FileProvider; +import androidx.core.graphics.Insets; +import androidx.core.view.OnApplyWindowInsetsListener; +import androidx.core.view.ViewCompat; +import androidx.core.view.WindowInsetsCompat; import com.geniusscansdk.core.LicenseException; import com.geniusscansdk.scanflow.ScanConfiguration; import com.geniusscansdk.scanflow.ScanFlow; import com.geniusscansdk.scanflow.ScanResult; +import com.google.android.material.dialog.MaterialAlertDialogBuilder; import java.io.File; import java.io.FileOutputStream; @@ -38,10 +51,20 @@ public class MainActivity extends AppCompatActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); EdgeToEdge.enable(this); + setContentView(R.layout.activity_main); Toolbar toolbar = findViewById(R.id.toolbar); setSupportActionBar(toolbar); getSupportActionBar().setTitle("GS SDK Simple Demo"); + ViewCompat.setOnApplyWindowInsetsListener(toolbar, new OnApplyWindowInsetsListener() { + @NonNull + @Override + public WindowInsetsCompat onApplyWindowInsets(@NonNull View v, @NonNull WindowInsetsCompat insets) { + Insets systemInsets = insets.getInsets(WindowInsetsCompat.Type.systemBars()); + v.setPadding(v.getPaddingLeft(), systemInsets.top, v.getPaddingRight(), v.getPaddingBottom()); + return insets; + } + }); // This code shows how to initialize the SDK with a license key. // Without a license key, the SDK runs for 60 seconds and then the app needs to be restarted. @@ -67,9 +90,9 @@ private ScanConfiguration createBaseConfiguration() { scanConfiguration.photoLibraryButtonHidden = false; scanConfiguration.flashButtonHidden = false; scanConfiguration.defaultFlashMode = ScanConfiguration.FlashMode.AUTO; - scanConfiguration.backgroundColor = Color.WHITE; - scanConfiguration.foregroundColor = ContextCompat.getColor(this, R.color.colorPrimary); - scanConfiguration.highlightColor = ContextCompat.getColor(this, R.color.colorAccent); + scanConfiguration.backgroundColor = ContextCompat.getColor(this, R.color.md_theme_background); + scanConfiguration.foregroundColor = ContextCompat.getColor(this, R.color.md_theme_primary); + scanConfiguration.highlightColor = Color.BLUE; scanConfiguration.availableFilters = Arrays.asList(NONE, AUTOMATIC, AUTOMATIC_BLACK_AND_WHITE, AUTOMATIC_COLOR, PHOTO, SOFT_GRAYSCALE, SOFT_COLOR, STRONG_MONOCHROME ); @@ -137,20 +160,20 @@ protected void onActivityResult(int requestCode, int resultCode, @Nullable Inten startActivity(intent); } catch (LicenseException e) { if (e.errorCode == LicenseException.ErrorCode.ExpiredDemo) { - new AlertDialog.Builder(this) + new MaterialAlertDialogBuilder(this) .setMessage(e.getMessage()) .setPositiveButton("Restart", (dialog, which) -> restartApp()) .show(); } else { // The license key is invalid or expired, either ask the user to update the app or provide a fallback - new AlertDialog.Builder(this) + new MaterialAlertDialogBuilder(this) .setMessage("Please update to the latest version.") .setPositiveButton(android.R.string.ok, (dialogInterface, i) -> {}) .show(); } } catch (Exception e) { Log.e(TAG, "Error during scan flow", e); - new AlertDialog.Builder(this) + new MaterialAlertDialogBuilder(this) .setMessage("An error occurred: " + e.getMessage()) .setPositiveButton(android.R.string.ok, (dialogInterface, i) -> {}) .show(); diff --git a/android/demo-simple/src/main/res/layout/activity_main.xml b/android/demo-simple/src/main/res/layout/activity_main.xml index 027b76a..2fe25ed 100644 --- a/android/demo-simple/src/main/res/layout/activity_main.xml +++ b/android/demo-simple/src/main/res/layout/activity_main.xml @@ -1,7 +1,6 @@ - + android:layout_height="match_parent" + /> diff --git a/android/demo-simple/src/main/res/values-night/colors.xml b/android/demo-simple/src/main/res/values-night/colors.xml new file mode 100644 index 0000000..5217afd --- /dev/null +++ b/android/demo-simple/src/main/res/values-night/colors.xml @@ -0,0 +1,143 @@ + + #73D8C7 + #003731 + #007A6D + #FFFFFF + #A8CEC6 + #113631 + #21453F + #B5DBD3 + #D5BBFF + #3B2264 + #7A60A5 + #FFFFFF + #FFB4AB + #690005 + #93000A + #FFDAD6 + #0F1413 + #DFE3E1 + #0F1413 + #DFE3E1 + #3E4946 + #BDC9C5 + #879390 + #3E4946 + #000000 + #DFE3E1 + #2C3130 + #006B5F + #90F4E3 + #00201C + #73D8C7 + #005047 + #C4EAE2 + #00201C + #A8CEC6 + #2A4D47 + #ECDCFF + #25084E + #D5BBFF + #523A7C + #0F1413 + #353A39 + #0A0F0E + #171D1B + #1B211F + #262B2A + #313634 + #77DCCB + #001A16 + #36A092 + #000000 + #ACD2CA + #001A16 + #739890 + #000000 + #D8C0FF + #200249 + #9F84CC + #000000 + #FFBAB1 + #370001 + #FF5449 + #000000 + #0F1413 + #DFE3E1 + #0F1413 + #F7FCF9 + #3E4946 + #C1CDCA + #99A5A2 + #798682 + #000000 + #DFE3E1 + #262B2A + #005248 + #90F4E3 + #001511 + #73D8C7 + #003E37 + #C4EAE2 + #001511 + #A8CEC6 + #183C36 + #ECDCFF + #1A003E + #D5BBFF + #41286A + #0F1413 + #353A39 + #0A0F0E + #171D1B + #1B211F + #262B2A + #313634 + #EBFFFA + #000000 + #77DCCB + #000000 + #EBFFFA + #000000 + #ACD2CA + #000000 + #FFF9FE + #000000 + #D8C0FF + #000000 + #FFF9F9 + #000000 + #FFBAB1 + #000000 + #0F1413 + #DFE3E1 + #0F1413 + #FFFFFF + #3E4946 + #F1FEF9 + #C1CDCA + #C1CDCA + #000000 + #DFE3E1 + #000000 + #00302A + #94F9E7 + #000000 + #77DCCB + #001A16 + #C8EFE6 + #000000 + #ACD2CA + #001A16 + #EFE1FF + #000000 + #D8C0FF + #200249 + #0F1413 + #353A39 + #0A0F0E + #171D1B + #1B211F + #262B2A + #313634 + diff --git a/android/demo-simple/src/main/res/values-night/themes.xml b/android/demo-simple/src/main/res/values-night/themes.xml new file mode 100644 index 0000000..f694812 --- /dev/null +++ b/android/demo-simple/src/main/res/values-night/themes.xml @@ -0,0 +1,50 @@ + + + diff --git a/android/demo-simple/src/main/res/values/colors.xml b/android/demo-simple/src/main/res/values/colors.xml index f3c8000..916e162 100644 --- a/android/demo-simple/src/main/res/values/colors.xml +++ b/android/demo-simple/src/main/res/values/colors.xml @@ -1,7 +1,150 @@ - - #008577 - #00574B - #D81B60 #629ED6 + + + #008577 + #FFFFFF + #008375 + #FFFFFF + #42655E + #FFFFFF + #C5ECE3 + #2C4F49 + #5C4386 + #FFFFFF + #8268AE + #FFFFFF + #BA1A1A + #FFFFFF + #FFDAD6 + #410002 + #F6FAF8 + #171D1B + #F6FAF8 + #171D1B + #D9E5E1 + #3E4946 + #6D7A76 + #BDC9C5 + #000000 + #2C3130 + #EDF2EF + #73D8C7 + #90F4E3 + #00201C + #73D8C7 + #005047 + #C4EAE2 + #00201C + #A8CEC6 + #2A4D47 + #ECDCFF + #25084E + #D5BBFF + #523A7C + #D6DBD9 + #F6FAF8 + #FFFFFF + #F0F5F2 + #EAEFEC + #E5E9E7 + #DFE3E1 + #004C43 + #FFFFFF + #008375 + #FFFFFF + #264943 + #FFFFFF + #587B74 + #FFFFFF + #4E3578 + #FFFFFF + #8268AE + #FFFFFF + #8C0009 + #FFFFFF + #DA342E + #FFFFFF + #F6FAF8 + #171D1B + #F6FAF8 + #171D1B + #D9E5E1 + #3A4543 + #56625F + #717D7A + #000000 + #2C3130 + #EDF2EF + #73D8C7 + #008375 + #FFFFFF + #00685D + #FFFFFF + #587B74 + #FFFFFF + #3F625C + #FFFFFF + #8268AE + #FFFFFF + #684F93 + #FFFFFF + #D6DBD9 + #F6FAF8 + #FFFFFF + #F0F5F2 + #EAEFEC + #E5E9E7 + #DFE3E1 + #002822 + #FFFFFF + #004C43 + #FFFFFF + #002822 + #FFFFFF + #264943 + #FFFFFF + #2C1255 + #FFFFFF + #4E3578 + #FFFFFF + #4E0002 + #FFFFFF + #8C0009 + #FFFFFF + #F6FAF8 + #171D1B + #F6FAF8 + #000000 + #D9E5E1 + #1B2624 + #3A4543 + #3A4543 + #000000 + #2C3130 + #FFFFFF + #99FEED + #004C43 + #FFFFFF + #00332D + #FFFFFF + #264943 + #FFFFFF + #0D322D + #FFFFFF + #4E3578 + #FFFFFF + #371E60 + #FFFFFF + #D6DBD9 + #F6FAF8 + #FFFFFF + #F0F5F2 + #EAEFEC + #E5E9E7 + #DFE3E1 diff --git a/android/demo-simple/src/main/res/values/styles.xml b/android/demo-simple/src/main/res/values/styles.xml deleted file mode 100644 index 177cefc..0000000 --- a/android/demo-simple/src/main/res/values/styles.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - + diff --git a/cordova-plugin-genius-scan-demo/config.xml b/cordova-plugin-genius-scan-demo/config.xml index 9f6af8a..ec995bd 100644 --- a/cordova-plugin-genius-scan-demo/config.xml +++ b/cordova-plugin-genius-scan-demo/config.xml @@ -39,7 +39,7 @@ - + diff --git a/dotnet-maui/SimpleDemo.csproj b/dotnet-maui/SimpleDemo.csproj index 9c43140..605b518 100644 --- a/dotnet-maui/SimpleDemo.csproj +++ b/dotnet-maui/SimpleDemo.csproj @@ -55,10 +55,10 @@ - + - + diff --git a/flutter-plugin-genius-scan-demo/android/gradle/wrapper/gradle-wrapper.properties b/flutter-plugin-genius-scan-demo/android/gradle/wrapper/gradle-wrapper.properties index 0faa699..09523c0 100644 --- a/flutter-plugin-genius-scan-demo/android/gradle/wrapper/gradle-wrapper.properties +++ b/flutter-plugin-genius-scan-demo/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ -#Tue Nov 28 09:30:09 CET 2023 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/flutter-plugin-genius-scan-demo/ios/Flutter/Flutter.podspec b/flutter-plugin-genius-scan-demo/ios/Flutter/Flutter.podspec index 29758b7..98e1633 100644 --- a/flutter-plugin-genius-scan-demo/ios/Flutter/Flutter.podspec +++ b/flutter-plugin-genius-scan-demo/ios/Flutter/Flutter.podspec @@ -11,7 +11,7 @@ Pod::Spec.new do |s| s.license = { :type => 'BSD' } s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' } s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s } - s.ios.deployment_target = '11.0' + s.ios.deployment_target = '12.0' # Framework linking is handled by Flutter tooling, not CocoaPods. # Add a placeholder to satisfy `s.dependency 'Flutter'` plugin podspecs. s.vendored_frameworks = 'path/to/nothing' diff --git a/flutter-plugin-genius-scan-demo/ios/Podfile.lock b/flutter-plugin-genius-scan-demo/ios/Podfile.lock index 32dac9c..db25e86 100644 --- a/flutter-plugin-genius-scan-demo/ios/Podfile.lock +++ b/flutter-plugin-genius-scan-demo/ios/Podfile.lock @@ -26,10 +26,10 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 - flutter_genius_scan: cfd11a652f735f92fedfd257fedee150af48c8c9 - open_filex: 6e26e659846ec990262224a12ef1c528bb4edbe4 - path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 + flutter_genius_scan: 6c2b2b2ebb78be512c20e90fb7c18e5aa3e02499 + open_filex: 432f3cd11432da3e39f47fcc0df2b1603854eff1 + path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564 PODFILE CHECKSUM: 3ce3a3b82c5cf6a622cb22850b0afa4ee279bea6 -COCOAPODS: 1.12.1 +COCOAPODS: 1.16.2 diff --git a/flutter-plugin-genius-scan-demo/ios/Runner.xcodeproj/project.pbxproj b/flutter-plugin-genius-scan-demo/ios/Runner.xcodeproj/project.pbxproj index 0deec6c..f25e013 100644 --- a/flutter-plugin-genius-scan-demo/ios/Runner.xcodeproj/project.pbxproj +++ b/flutter-plugin-genius-scan-demo/ios/Runner.xcodeproj/project.pbxproj @@ -151,6 +151,7 @@ 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 29A70F9A715FD120C6943368 /* [CP] Embed Pods Frameworks */, + 9135BA4106DEC08380916C86 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -267,6 +268,24 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; + 9135BA4106DEC08380916C86 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh", + "${PODS_CONFIGURATION_BUILD_DIR}/path_provider_foundation/path_provider_foundation_privacy.bundle", + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/path_provider_foundation_privacy.bundle", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; diff --git a/flutter-plugin-genius-scan-demo/pubspec.lock b/flutter-plugin-genius-scan-demo/pubspec.lock index 1e0cf99..6e912e8 100644 --- a/flutter-plugin-genius-scan-demo/pubspec.lock +++ b/flutter-plugin-genius-scan-demo/pubspec.lock @@ -76,7 +76,7 @@ packages: name: flutter_genius_scan url: "https://pub.dartlang.org" source: hosted - version: "5.3.1" + version: "5.4.0" flutter_test: dependency: "direct dev" description: flutter diff --git a/flutter-plugin-genius-scan-demo/pubspec.yaml b/flutter-plugin-genius-scan-demo/pubspec.yaml index ba3a04b..d685114 100644 --- a/flutter-plugin-genius-scan-demo/pubspec.yaml +++ b/flutter-plugin-genius-scan-demo/pubspec.yaml @@ -15,7 +15,7 @@ dependencies: open_filex: ^4.3.4 flutter_genius_scan: - version: 5.3.1 + version: 5.4.0 path_provider: ^2.1.1 dev_dependencies: diff --git a/ios/GSSDKCustomDemo/GSSDKCustomDemo.xcodeproj/project.pbxproj b/ios/GSSDKCustomDemo/GSSDKCustomDemo.xcodeproj/project.pbxproj index d6a5269..dfafde2 100644 --- a/ios/GSSDKCustomDemo/GSSDKCustomDemo.xcodeproj/project.pbxproj +++ b/ios/GSSDKCustomDemo/GSSDKCustomDemo.xcodeproj/project.pbxproj @@ -449,7 +449,7 @@ repositoryURL = "https://github.com/thegrizzlylabs/geniusscan-sdk-spm"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 5.3.1; + minimumVersion = 5.4.0; }; }; /* End XCRemoteSwiftPackageReference section */ diff --git a/ios/GSSDKSimpleDemo/GSSDKSimpleDemo.xcodeproj/project.pbxproj b/ios/GSSDKSimpleDemo/GSSDKSimpleDemo.xcodeproj/project.pbxproj index 8f82972..5e6e9d5 100644 --- a/ios/GSSDKSimpleDemo/GSSDKSimpleDemo.xcodeproj/project.pbxproj +++ b/ios/GSSDKSimpleDemo/GSSDKSimpleDemo.xcodeproj/project.pbxproj @@ -539,7 +539,7 @@ repositoryURL = "https://github.com/thegrizzlylabs/geniusscan-sdk-spm"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 5.3.1; + minimumVersion = 5.4.0; }; }; /* End XCRemoteSwiftPackageReference section */ diff --git a/react-native-genius-scan-demo/package.json b/react-native-genius-scan-demo/package.json index c4dc420..3a352e0 100644 --- a/react-native-genius-scan-demo/package.json +++ b/react-native-genius-scan-demo/package.json @@ -10,7 +10,7 @@ "test": "jest" }, "dependencies": { - "@thegrizzlylabs/react-native-genius-scan": "^5.3.1", + "@thegrizzlylabs/react-native-genius-scan": "^5.4.0", "react": "18.3.1", "react-native": "0.76.1", "react-native-file-viewer": "^2.1.5"