Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updata Camera Configuration in JAVA not working #183

Closed
monowar1993 opened this issue Jan 19, 2018 · 1 comment
Closed

Updata Camera Configuration in JAVA not working #183

monowar1993 opened this issue Jan 19, 2018 · 1 comment
Assignees
Labels

Comments

@monowar1993
Copy link

monowar1993 commented Jan 19, 2018

What am I trying to achieve or the steps to reproduce?

I have been trying to update camera configuration. But it was not updating when I used JAVA codes. But working fine with kotlin. Tested on you Sample app also.

How did I initialize FA?

Cameraconfiguration = CameraConfiguration.builder()
                .focusMode(firstAvailable(continuousFocusPicture(), autoFocus(), fixed()))
                //.flash(firstAvailable(autoFlash(), torch(), off(), on()))
                .flash(off())
                .previewResolution(highestResolution())
                .previewFpsRange(highestFps())
                .photoResolution(highestResolution())
                .jpegQuality(highestQuality())
                .antiBandingMode(auto())
                .sensorSensitivity(highestSensorSensitivity())
                .build();

Fotoapparat fotoapparat = new Fotoapparat(getActivity(), binding.cameraView, binding.focusView, back(),
ScaleType.CenterCrop, configuration, e -> {
            e.printStackTrace();
            return null;
        }, loggers(logcat(), fileLogger(getActivity())));

and update using
fotoapparat.updateConfiguration(UpdateConfiguration.builder().flash(on()).build());
this seems not to be working. As the parameters are not updated. I tried to change the photoResolution() also. But parameters are not updated. They are same as the way I initialized them.
but bellow is working fine
fotoapparat.updateConfiguration(configuration.builder().flash(on()).build());

What did I expect?

I expected that
fotoapparat.updateConfiguration(UpdateConfiguration.builder().flash(on()).build());
this code would work perfectly on JAVA as it is working fine in kotlin.

Context:

  • FA version: 2.1.2:
  • Device: Nexus 5, 7.1.1, LineageOS Custom ROM:

Many thanks for making such a good Camera Library

@Diolor Diolor added the bug label Jan 19, 2018
Diolor added a commit that referenced this issue Jan 19, 2018
@Diolor Diolor self-assigned this Jan 19, 2018
@Diolor
Copy link
Member

Diolor commented Jan 19, 2018

Thanks for reporting this! Will be fixed in the next release

@Diolor Diolor closed this as completed in 58ffc4f Jan 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants