nawab
nawab

Reputation: 352

Android camera exposure

I am facing issues with getExposureCompensation() and getExposureCompensationStep() apis. Whenever I call these two apis, it throws a null pointer exception. When i use the getExposureCompensation after using setExposureCompensation() api, then it works fine. But in the case of getExposureCompensationStep(), i dont have a choice.

Your opinion and suggestion in this matter will be appreciated.

Thanks Nawab

Upvotes: 2

Views: 3986

Answers (1)

Kevin Coppock
Kevin Coppock

Reputation: 134664

EDIT: There's your problem. :) Or not... >.>

Camera does not have a getExposureCompensation() or getExposureCompensationStep() method. Those are methods for your Camera.Parameters object! Try changing it to:

int expcomp = params.getExposureCompensation();
float expstep = params.getExposureCompensationStep();

Upvotes: 3

Related Questions