Skip to content

Commit

Permalink
解决FileProvider冲突问题
Browse files Browse the repository at this point in the history
  • Loading branch information
weimingjue committed Jul 7, 2023
1 parent e747566 commit 550d827
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
3 changes: 2 additions & 1 deletion simple/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
android:name=".MainActivity"
android:screenOrientation="portrait"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/app_name" >
android:label="@string/app_name"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
Expand Down
12 changes: 7 additions & 5 deletions takephoto_library/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
<uses-permission android:name="android.permission.CAMERA" />

<application android:allowBackup="true">
<activity android:name="com.soundcloud.android.crop.CropImageActivity" />
<activity
android:name="com.soundcloud.android.crop.CropImageActivity"
android:exported="false" />
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:grantUriPermissions="true"
android:exported="false">
android:name=".uitl.TFileProvider"
android:authorities="${applicationId}.TakePhoto"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ public class TConstant {
public final static int PERMISSION_REQUEST_TAKE_PHOTO = 2000;

public final static String getFileProviderName(Context context) {
return context.getPackageName() + ".fileprovider";
return context.getPackageName() + ".TakePhoto";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package org.devio.takephoto.uitl;

import android.support.v4.content.FileProvider;

public class TFileProvider extends FileProvider {
}

0 comments on commit 550d827

Please sign in to comment.