QrAndBarcodeScanner icon indicating copy to clipboard operation
QrAndBarcodeScanner copied to clipboard

Xiaomi Mi 9T App does not work

Open cy-coe opened this issue 4 years ago • 9 comments

App starts, requests cam permission (which I allowed) and then gui shows up without cam picture. App freezes when I tap on any icon at the bottom of the screen. This is the error miui offers me as error report: java.lang.IllegalStateException: Fragment i{c161323 (4461f3e0-1990-4606-ade7-e2d3e3f1c00b)} not attached to a context. at androidx.fragment.app.Fragment.requireContext(SourceFile:2) at g.a.a.e.b.a(SourceFile:1) at g.a.a.f.d.c.g.invoke(SourceFile:3) at g.a.a.f.d.c.k.a(Unknown Source:2) at g.c.a.a.b$d.run(SourceFile:7)

cy-coe avatar Oct 07 '20 12:10 cy-coe

Thank you for reporting a bug. I guess it might be caused by MIUI. Does this error occur only on the first start or does it happen every time?

wewewe718 avatar Oct 07 '20 12:10 wewewe718

Every time.

cy-coe avatar Oct 07 '20 13:10 cy-coe

OK, I will take a look.

wewewe718 avatar Oct 07 '20 14:10 wewewe718

A Minute ago I had cam view. After closing the App and opening again I had no cam view and got: "Failed to connect to camera service"

cy-coe avatar Oct 07 '20 14:10 cy-coe

This issue is caused by using old camera API in my app. It seems that it does not work on Xiaomi devices with Android 10. I will rewrite it to use new CameraX API and this issue will be solved.

wewewe718 avatar Oct 08 '20 17:10 wewewe718

I am not sure if this is the same error:

Device: Xiaomi Mi 9t Pro, Android 10 (Resurrection OS 8.6.2) (+ ANXCamera v148, shouldn't matter, but since it is a magisk module, maybe it is replacing something) But I believe I am using the MIUI vendor image, whatever that means.

Once I open the app I get a few ms of live picture, then everything freezes and I can't do anything. Camera is still active, until I force close the app.

I tried to get a logcat but wasn't able to do so.

Once the new API is implemented and I still affected by the freeze, i can try again.

Stimmenhotel avatar Nov 27 '20 11:11 Stimmenhotel

Im having this issue as well. The app freezes right after the launch and after a delay reports fhat it "Failed to connect to camera service". It worked the first time but after that, I haven't been able to make it work. Really want to use this open source app over the miui native one.

Xiaomi mi 11 lite, miui 12

IdreesM0 avatar May 30 '21 19:05 IdreesM0

Same for me, sometimes. First time after reboot I'm able to use it as long as I want, but from the second start on I get the issues reported in this thread.

Mi 9T, MIUI 12.0.5

waldgirgl avatar Jun 15 '21 07:06 waldgirgl

Me too. No other app accessing the camera seems to have this issue. I don't use ANXCamera, Magisk or any module. The device is not rooted only unlocked. Installed cameras are Open Camera, GCam and whatever simple default Camera app comes with ArrowOS. I tried to disable the latter but it didn't help and Kee Notes seems to rely on it.

Workaround: Force kill all apps using the camera, clear cache of them and try again.

Device: Xiaomi Redmi Note 10 Pro (sweet) OS: ArrowOS 12.1 (Android 12)

cbiere avatar Jun 05 '22 09:06 cbiere