d
This commit is contained in:
@@ -105,6 +105,28 @@ public class SelectPicDanimicActivity extends Activity implements OnClickListene
|
||||
break;
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
|
||||
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
intent.setAction(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri
|
||||
.fromFile(new File(fileolod)));
|
||||
startActivityForResult(intent, 1);
|
||||
|
||||
|
||||
//拍照我们用Action为MediaStore.ACTION_IMAGE_CAPTURE,
|
||||
//有些人使用其他的Action但我发现在有些机子中会出问题,所以优先选择这个
|
||||
|
||||
|
||||
/* Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(
|
||||
Environment.getExternalStorageDirectory(), "temp.jpg")));
|
||||
System.out.println("=============" + Environment.getExternalStorageDirectory());*/
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user