I am using LG Optimus 3D model, I am able to turn on the torch light when I switch the camera to video recording mode. In normal capture mode, I am only able to turn on flash light.
I have tried several way by adding different parameters into the Camera object, but none of them work. My code is as below:
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_flash_light);
    PackageManager pm = getPackageManager();
    if (! pm.hasSystemFeature(PackageManager.FEATURE_CAMERA_FLASH)){
        Toast.makeText(this, "Your phone does not have flash light support.", Toast.LENGTH_LONG).show();
        finish();
    }
    camera = Camera.open(); 
    cParameters = camera.getParameters();
    cParameters.setFlashMode(Camera.Parameters.FLASH_MODE_TORCH);
camera.setParameters(cParameters);
}
No point I cannot turn it on programmatically, I have checked as below to ensure my phone support torch mode, in fact, I am really able to turn on for my device.
List<String> abc = cParameters.getSupportedFlashModes();
        for (String a : abc){
            Log.d("mode: ", a);
}
Please help, anyway to do that? * The firmware is 2.2
 
     
    