From 086d366a1c424095de091140ecc8107c3c8bebf0 Mon Sep 17 00:00:00 2001 From: Albert Vaca Cintora Date: Sun, 29 Dec 2024 02:34:10 +0100 Subject: [PATCH] Fix authority not matching manifest in debug builds --- .../kdeconnect/Plugins/SharePlugin/ReceiveNotification.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/org/kde/kdeconnect/Plugins/SharePlugin/ReceiveNotification.java b/src/org/kde/kdeconnect/Plugins/SharePlugin/ReceiveNotification.java index a353296c..b2e88914 100644 --- a/src/org/kde/kdeconnect/Plugins/SharePlugin/ReceiveNotification.java +++ b/src/org/kde/kdeconnect/Plugins/SharePlugin/ReceiveNotification.java @@ -23,6 +23,7 @@ import androidx.core.content.FileProvider; import org.kde.kdeconnect.Device; import org.kde.kdeconnect.Helpers.NotificationHelper; +import org.kde.kdeconnect_tp.BuildConfig; import org.kde.kdeconnect_tp.R; import java.io.File; @@ -145,7 +146,7 @@ class ReceiveNotification { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && "file".equals(destinationUri.getScheme())) { //Nougat and later require "content://" uris instead of "file://" uris File file = new File(destinationUri.getPath()); - Uri contentUri = FileProvider.getUriForFile(device.getContext(), "org.kde.kdeconnect_tp.fileprovider", file); + Uri contentUri = FileProvider.getUriForFile(device.getContext(), BuildConfig.APPLICATION_ID+".fileprovider", file); intent.setDataAndType(contentUri, mimeType); intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); shareIntent.putExtra(Intent.EXTRA_STREAM, contentUri);