Package 

Class MediaStoreCaptureStrategy

  • All Implemented Interfaces:
    android.os.Parcelable , github.leavesczy.matisse.CaptureStrategy

    
    public final class MediaStoreCaptureStrategy
     implements CaptureStrategy
                        

    通过 MediaStore 生成 ImageUri 根据系统版本决定是否需要申请 WRITE_EXTERNAL_STORAGE 权限 所拍的照片会保存在系统相册中

    • Method Summary

      Modifier and Type Method Description
      Boolean shouldRequestWriteExternalStoragePermission(Context context) 是否需要申请 WRITE_EXTERNAL_STORAGE 权限
      Uri createImageUri(Context context) 生成图片 Uri
      MediaResource loadResource(Context context, Uri imageUri) 获取拍照结果
      Unit onTakePictureCanceled(Context context, Uri imageUri) 当用户取消拍照时调用
      Bundle getCaptureExtra() 用于为相机设置启动参数 返回值会传递给启动相机的 Intent
      • Methods inherited from class github.leavesczy.matisse.MediaStoreCaptureStrategy

        createImageName
      • Methods inherited from class github.leavesczy.matisse.CaptureStrategy

        describeContents, writeToParcel
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait