PhotoPicker icon indicating copy to clipboard operation
PhotoPicker copied to clipboard

7.0系统出现UncaughtExceptionHandler

Open Xiaa520 opened this issue 8 years ago • 0 comments

Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); takePictureIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); if (takePictureIntent.resolveActivity(activity.getPackageManager()) != null) { if (Utils.existSDCard()) takeImageFile = new File(Environment.getExternalStorageDirectory(), "/DCIM/camera/"); else takeImageFile = Environment.getDataDirectory(); takeImageFile = createFile(takeImageFile, "IMG_", ".jpg"); if (takeImageFile != null) { // 默认情况下,即不需要指定intent.putExtra(MediaStore.EXTRA_OUTPUT, uri); // 照相机有自己默认的存储路径,拍摄的照片将返回一个缩略图。如果想访问原始图片, // 可以通过dat extra能够得到原始图片位置。即,如果指定了目标uri,data就没有数据, // 如果没有指定uri,则data就返回有数据! takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(takeImageFile)); } } activity.startActivityForResult(takePictureIntent, requestCode);

Xiaa520 avatar Feb 11 '17 01:02 Xiaa520