w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Camera preview is blurred in samsung galaxy grand but it is good in samsung s3

You could try to tell the camera to auto focus. Add something similar to this in your surfaceChanged routine.

// newer phones can be told to auto focus before taking the
picture
int currentapiVersion = android.os.Build.VERSION.SDK_INT;
if (currentapiVersion >=
android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
    if (
p.getSupportedFocusModes().contains(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE)
) {
        p.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE);
    }
}

mCamera.setParameters(p);
mCamera.startPreview();




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.