Skip to content

Commit

Permalink
Fix conflict problems caused by "authorities"
Browse files Browse the repository at this point in the history
Fix conflict problems caused by "authorities"
  • Loading branch information
liqi committed Nov 13, 2017
1 parent ac870fa commit f0e200d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion utils/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<!--7.0需要的Uri权限提供-->
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="com.liql.photograph.utils"
android:authorities="${applicationId}.photograph.utils"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,9 @@ private void camera() {
mImageFile = getPath("", mPhotographConfigura.getImagePath());
Uri mOutPutFileUri;
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {
String packageName = activity.getApplication().getPackageName();
//7.0需要
mOutPutFileUri = FileProvider.getUriForFile(activity, "com.liql.photograph.utils", mImageFile);
mOutPutFileUri = FileProvider.getUriForFile(activity,packageName+".photograph.utils", mImageFile);
} else {
mOutPutFileUri = Uri.fromFile(mImageFile);
}
Expand Down

0 comments on commit f0e200d

Please sign in to comment.