Ensure the receiver has permissions to open the file

This commit is contained in:
Albert Vaca Cintora
2025-11-09 20:31:51 +01:00
parent f04ffc67eb
commit c98ce1f472

View File

@@ -155,8 +155,8 @@ class ReceiveNotification {
intent.setDataAndType(destinationUri, mimeType);
shareIntent.putExtra(Intent.EXTRA_STREAM, destinationUri);
}
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
shareIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_GRANT_READ_URI_PERMISSION);
shareIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_GRANT_READ_URI_PERMISSION);
PendingIntent resultPendingIntent = PendingIntent.getActivity(
device.getContext(),