Fix file provider authorities modified incorrectly

This commit is contained in:
Ming Ming 2022-04-08 03:11:26 +08:00
parent 698ee78c97
commit d8bd05191c
2 changed files with 2 additions and 2 deletions

View file

@ -45,7 +45,7 @@
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="com.nkming.nc_photos.plugin.fileprovider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data

View file

@ -138,7 +138,7 @@ class MediaStoreChannelHandler(activity: Activity) :
val fileUri = Uri.fromFile(file)
triggerMediaScan(fileUri)
val contentUri = FileProvider.getUriForFile(
_context, "com.nkming.nc_photos.plugin.fileprovider", file
_context, "${BuildConfig.APPLICATION_ID}.fileprovider", file
)
result.success(contentUri.toString())
}