My problem is that I'm trying to find out about the camera, and now I have made an application that can turn on the flashlight on my HTC Wildfire, my Wildfire is running Android 2.2.
Here is the code I'm using:
//Flash portion
camera = Camera.open();
parameters = camera.getParameters();
parameters.setFlashMode(Parameters.FLASH_MODE_TORCH);
camera.setParameters(parameters);
Now I will let my friend check it to see if it works on his phone, but it’s not ... He has Optimus 2X (Android v.2.2.2), and he has two cameras. When he opens the application, nothing happens, and my suspicion tells me that it is connected to the wrong camera. So, I did my research and found that in 2.3 added support for multiple cameras!
But I have to run version 2.2 so that it works on my phone and it, and in 2.2 you CANNOT use:
Camera.open( cameraId );
, , . , ?