yuriy-budiyev / code-scanner

Code scanner library for Android, based on ZXing
MIT License
1.09k stars 266 forks source link

Flash not working on Redmi Note 8 Pro #153

Open Gl0deanR opened 2 years ago

Gl0deanR commented 2 years ago

I have made a demo app for my school project and it works just fine until I tested it on a Xiaomi Redmi Note 8 Pro running MUI Global v12.0.5 Stable, Android 10. Tested the app on several Samsung phones and everything works. Permissions and all, focus, flashlight, scanning. Except when I installed it on a Xiaomi Redmi Note 8 Pro. Here, everything but the flashlight work perfectly.

The only errors I see in Android Studio when running on debug mode are:

E/GraphicExt: GraphicExtModuleLoader::CreateGraphicExtInstance false

E/libc: Access denied finding property "camera.aux.packagelist"

E/libc: Access denied finding property "vendor.camera.hal1.packagelist"

I am using the latest version of the code scanner: implementation("com.github.yuriy-budiyev:code-scanner:2.1.2")

And I am using the permissions: <uses-permission android:name="android.permission.CAMERA"> and I have also tried with: <uses-feature android:name="android.hardware.camera">

I would appreciate so, so much if anyone found or finds a fix to this.

Edit: Is it possible to make the app no longer have access to the flashlight? This way I believe I can turn it on from the top bar (quick access menu) because right now, when the app runs, the flashlight button is disabled.

Thank you!

HunterPillu commented 2 years ago

Gl0deanR did you find any solution??. I am getting same error on Samsung S9 Android 10.

Gl0deanR commented 2 years ago

Gl0deanR did you find any solution??. I am getting same error on Samsung S9 Android 10.

No... I'm still waiting for @yuriy-budiyev response, maybe he will know ho to fix this for us.

mahendradabiaplite commented 2 years ago

I'm also having the same issue with some device Vivo x70 pro

HunterPillu commented 2 years ago

@mahendradabiaplite could you please try again by adding uses-feature android:name="android.hardware.camera.any" and uses-feature android:name="android.hardware.camera.flashlight"

mahendradabiaplite commented 2 years ago

@HunterPillu not working after adding this permission too in vivo x70 pro

mahendradabiaplite commented 2 years ago

Hello @yuriy-budiyev could you please help and suggest what will the issue for the flashlight working in some devices and not working in some devices?

mpierucci commented 2 years ago

@yuriy-budiyev any update on this?

RuiEEE commented 1 year ago

Also not working on Samsung A22 5G

Wolfizarbabalam commented 1 year ago

Also not working on Sony Xperia XZ3 and Samsung A03s

Siddhesh2377 commented 1 year ago

an also not working on Redmi 10 s android 12 - S

slmg-it-dept commented 1 year ago

Also not working in Samsung A04e

bahadirerdemm commented 1 year ago

did you find a solution

slmg-it-dept commented 1 year ago

did you find a solution

you can use this instead of that <com.journeyapps.barcodescanner.CompoundBarcodeView android:id="@+id/barcode_scanner" android:layout_width="match_parent" android:layout_height="match_parent"/>

slmg-it-dept commented 1 year ago

com.journeyapps.barcodescanner.CompoundBarcodeView

implementation 'com.journeyapps:zxing-android-embedded:4.3.0'