Apparence-io / CamerAwesome

📸 Embedding a camera experience within your own app shouldn't be that hard. A flutter plugin to integrate awesome Android / iOS camera experience.
https://ApparenceKit.dev
MIT License
976 stars 256 forks source link

Infinite loading #106

Closed SardorbekR closed 3 years ago

SardorbekR commented 3 years ago

Steps to Reproduce

This is my code

final ValueNotifier<CameraFlashes> _switchFlash =
      ValueNotifier(CameraFlashes.AUTO);
  final ValueNotifier<Sensors> _sensor = ValueNotifier(Sensors.BACK);
  final ValueNotifier<CaptureModes> _captureMode =
      ValueNotifier(CaptureModes.PHOTO);

  final ValueNotifier<Size> _photoSize = ValueNotifier(const Size(1920, 1080)); //is everything ok in this line? code from example throw null exception so I had to change this line

CameraAwesome(
            testMode: false,
            onPermissionsResult: (bool? result) {},
            selectDefaultSize: (List<Size> availableSizes) =>
                const Size(1920, 1080),
            onCameraStarted: () {},
            onOrientationChanged: (CameraOrientations? newOrientation) {},
            sensor: _sensor,
            photoSize: _photoSize,
            switchFlashMode: _switchFlash,
            captureMode: _captureMode,
            fitted: true,
          ),

I just launched the camera page it just shows infinite loading, I've allowed camera permission

Expected results

I expected to see camera preview

Actual results

Infinite loading Log: [_retryStartCamera] 946654524 ...retry start camera in 2 seconds... 3 try left

About your device

Brand Model OS
Androi Emulator Android 10

g-apparence commented 3 years ago

Some emulator doesn't work with the camera. You should try on a real device sorry.

Sreeharikr commented 1 year ago

I have the same issue. My device is Xiaomi Redmi note 7

LastxTemplar commented 1 year ago

did anyone every find a fix for this? it seems to be happening on some Pixel 7 phones, same code works on other phones.

apalala-dev commented 1 year ago

This issue is rather old, please open a new one with more details (camerawesome version, details on the phone, example code, wether it happens all the time... All things that might help reproduce the problem 👌)