现在的项目用到了Android 手机的相机和相册 ,调用系统相册没问题
if (FileUtil.isExistSDCard()) {
Intent intent;if (ViewUtil.getSDKVerSion() >= 19) {
intent = new Intent(Intent.ACTION_OPEN_DOCUMENT, null);
} else {
intent = new Intent(Intent.ACTION_GET_CONTENT, null);
}
intent.addCategory(Intent.CATEGORY_OPENABLE);
intent.setType("image/*");
startActivityForResult(intent, Constants.IMAGE_CONSTANTS);
} else {
ViewUtil.toast(this, R.string.do_not_support);
}
可是调用系统相机的时候出现问题了,手机适配的问题
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra(MediaStore.EXTRA_OUTPUT, getCameraUri());
startActivityForResult(intent, Constants.CAMERE_CONSTANTS);</