Matisse集成及属性参考Matisse
使用相机必须指定
Matisse.from(SampleActivity.this)
.capture(true)
.captureStrategy(new CaptureStrategy(true, "com.thunder.sample.fileprovider"))
manifest
里必须指定provider
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="com.thunder.sample.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths_public"></meta-data>
</provider>
res
里新建个包xml
里新建个file_paths_public.xml
文件
<paths>
<external-path
name="my_images"
path="Android/data/com.thunder.sample.fileprovider/files/Pictures"/>
</paths>
注意:这三个里面的com.thunder.sample.fileprovider
这值是一致的
网友评论