diff --git a/CHANGELOG.md b/CHANGELOG.md index c331a5a..eb135ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.6.2 +* Fixed permission error on devices running Android 7 or lower. +* Updated dependencies + ## 0.6.1 * Fix bug which caused build to fail for iOS. (#452) diff --git a/android/build.gradle b/android/build.gradle index cd4c6f9..78dba60 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -9,7 +9,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:7.0.2' + classpath 'com.android.tools.build:gradle:7.0.3' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -25,7 +25,7 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' android { - compileSdkVersion 30 + compileSdkVersion 31 sourceSets { main.java.srcDirs += 'src/main/kotlin' @@ -33,6 +33,7 @@ android { defaultConfig { // minSdkVersion is determined by Native View. minSdkVersion 20 + targetSdkVersion 31 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" multiDexEnabled true } @@ -48,8 +49,8 @@ android { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation('com.journeyapps:zxing-android-embedded:4.2.0') { transitive = false } - implementation 'androidx.appcompat:appcompat:1.3.0' - implementation 'com.google.zxing:core:3.3.3' + implementation('com.journeyapps:zxing-android-embedded:4.3.0') { transitive = false } + implementation 'androidx.appcompat:appcompat:1.3.1' + implementation 'com.google.zxing:core:3.4.1' coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5' } diff --git a/android/src/main/kotlin/net/touchcapture/qr/flutterqr/QRView.kt b/android/src/main/kotlin/net/touchcapture/qr/flutterqr/QRView.kt index 3578f44..dc03065 100644 --- a/android/src/main/kotlin/net/touchcapture/qr/flutterqr/QRView.kt +++ b/android/src/main/kotlin/net/touchcapture/qr/flutterqr/QRView.kt @@ -117,8 +117,6 @@ class QRView(private val context: Context, messenger: BinaryMessenger, private v barcodeView!!.resume() result.success(settings.requestedCameraId) } - - } private fun getFlashInfo(result: MethodChannel.Result) { @@ -293,7 +291,9 @@ class QRView(private val context: Context, messenger: BinaryMessenger, private v } } else -> { - result?.error("cameraPermission", "Platform Version to low for camera permission check", null) + // We should have permissions on older OS versions + permissionGranted = true + channel.invokeMethod("onPermissionSet", true) } } } diff --git a/example/android/build.gradle b/example/android/build.gradle index 40b343e..3d8f62a 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -6,7 +6,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:7.0.2' + classpath 'com.android.tools.build:gradle:7.0.3' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index 7083094..0ae5687 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Fri Oct 08 10:14:36 CEST 2021 +#Tue Nov 16 20:02:48 CET 2021 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/pubspec.yaml b/pubspec.yaml index 017bb95..67379b9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: qr_code_scanner description: QR code scanner that can be embedded inside flutter. It uses zxing in Android and MTBBarcode scanner in iOS. -version: 0.6.1 +version: 0.6.2 homepage: https://juliuscanute.com repository: https://github.com/juliuscanute/qr_code_scanner