mintware-de / flutter_barcode_reader

A flutter plugin for reading 2D barcodes and QR codes.
MIT License
628 stars 463 forks source link

iOS/Android: once permissions are denied camera will flash when the user tries to scan #189

Closed natalieeeflores closed 4 years ago

natalieeeflores commented 4 years ago

The app will briefly open the camera when a user denies camera permissions. I am able to reproduce this behavior with the example app in this repo.

Steps to reproduce:

  1. Press scan button
  2. Deny camera permissions
  3. Press scan button again

barcode_scan version: 2.0.1

Devices reproduced on: iPhone 10R, iOS 13.3.1 Samsung Galaxy S9, Android 10

RPReplay_Final1583356036

devtronic commented 4 years ago

Please check if the fix in PR #186 works for you🙂

natalieeeflores commented 4 years ago

I've been having some issues testing the fix on android. I keep getting build failures when I try to run my project: Execution failed for task ':barcode_scan:compileDebugKotlin'. However, I have been able to run the project on an iOS device and can confirm that the bug is still reproducible

devtronic commented 4 years ago

Please run flutter clean and then open the Android Module directly (Android Studio -> Right click on your project root -> Flutter -> Open Android Module in Android Studio)

natalieeeflores commented 4 years ago

Unfortunately, my project still isn't running on android after following those steps. Here's the output from android studio: /.pub-cache/git/flutter_barcode_reader-ea67104d0024de29a73602a8c35c279900db20b7/android/src/main/kotlin/de/mintware/barcode_scan/BarcodeScannerActivity.kt: (33, 30): Unresolved reference: it

I'm running it on a new project that I've created, I followed the instructions in the readme, and copy-pasted the code in example/lib/main.dart. Thanks for your help in all this!

devtronic commented 4 years ago

In 2.0.2 the problem was resolved: https://pub.dev/packages/barcode_scan/versions/2.0.2