Hello!
I´m writing my first time here.
Here my question:
I´m doing a flash light aplication, and my aplication works in all devices
with flash, but it doesn´t work in some Samsung devices, how Samsung Galaxy
Ace.
I searched in Internet but i don´t find anything... and maybe help me here.
*My source code is:*
public class MainActivity extends Activity {
private Camera cam;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
if (cam != null) {
Parameters paramCamera = cam.getParameters();
List modesFlash = paramCamera.getSupportedFlashModes();
if (modesFlash != null &&
modesFlash.contains(Camera.Parameters.FLASH_MODE_TORCH)) {
paramCamera.setFlashMode(Camera.Parameters.FLASH_MODE_TORCH);
try {
cam.setParameters(paramCamera);
cam.startPreview();
} catch (Exception e) {
Toast.makeText(getApplicationContext(),
"Error1", Toast.LENGTH_LONG).show();
}
} else {
Toast.makeText(getApplicationContext(),
"Error2", Toast.LENGTH_LONG).show();
}
} else {
Toast.makeText(getApplicationContext(), "Error3", Toast.LENGTH_LONG).show();
}
}
}
Thank you so much
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en