我创建的相机应用,将闪光灯设置为mode.i正在使用的意图来启动相机app.I尝试folllowing代码,但闪光灯自动保持 关闭切换相机闪光灯自动模式
Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
fileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE);
Camera cam = Camera.open();
Camera.Parameters p = cam.getParameters();
p.setFlashMode(Parameters.FLASH_MODE_AUTO);
cam.setParameters(p);
cam.startPreview();
cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);
// start the image capture Intent
startActivityForResult(cameraIntent,CAMERA_CAPTURE_IMAGE_REQUEST_CODE);
尝试在SO- [这里](HTT这些答案p://stackoverflow.com/a/23337134/3921977)和[this](http://stackoverflow.com/a/6069503/3921977)。 –