我使用了很多代码并且都在 4.0 上工作,但是果冻豆操作系统不支持任何代码
try
{
Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(cameraIntent, 1);
}
catch(ActivityNotFoundException anfe){
//display an error message
// String errorMessage = "Whoops - your device doesn't support capturing images!";
Toast toast= Toast.makeText(getApplicationContext(), "Whoops - your device doesn't support capturing images!", Toast.LENGTH_SHORT);
toast.setGravity(Gravity.CENTER, 0, 0);
toast.show();
}