Don't hardcode app id

This commit is contained in:
Ming Ming 2021-07-15 13:15:48 +08:00
parent 4f54e2e150
commit 92e58daa9b
2 changed files with 2 additions and 2 deletions

View file

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

View file

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