原文:https://blog.csdn.net/uyy203/article/details/54445150
Intent i = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
//限制只调用系统相机
final Intent intent_camera = ((Activity)getContext()).getPackageManager()
.getLaunchIntentForPackage("com.android.camera");
if (intent_camera != null) {
i.setPackage("com.android.camera");
}
i.putExtra(MediaStore.Images.Media.ORIENTATION, 0);
i.putExtra(MediaStore.EXTRA_OUTPUT, u);
((Activity)getContext()).startActivityForResult(i, 1);
网友评论