PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV Mobile 2024 → Windev Mobile 18 - Access to Camera light
Windev Mobile 18 - Access to Camera light
Iniciado por BOOMER ( Penn State, 22,oct. 2013 21:23 - No hay respuesta
Miembro registrado
2 mensajes
Publicado el 22,octubre 2013 - 21:23
]I am attempting to capture a QRCode from and LCD screen under low light conditions (no backlight). While using BCCapture works extremely well under normal conditions, there appears to be no way to turn on the Camera light. I have a little Java procdure that I have written to turn on the light (shown below), but unless I unlock the camera BCCapture can't access the phone. I wish I could just get the code produced by BCCapture so I could enter the LightOn procedure to it.
Any suggestions?

import android.app.Activity;
import android.hardware.Camera;
import android.hardware.Camera.Parameters;
import android.os.Bundle;
import android.widget.Button;

public static void flashLightOn() {
android.hardware.Camera mCamera;
mCamera=Camera.open();

if( mCamera != null ){
Parameters params = mCamera.getParameters();
params.setFlashMode( Parameters.FLASH_MODE_TORCH );
mCamera.setParameters( params );
}
mCamera.unlock();
}