Share: use ACTION_SEND when sharing a single track so apps like Signal are offered as share target (#2405).

This commit is contained in:
graue70
2026-10-19 00:37:57 +02:00
committed by Dennis Guse
parent 94d068fe9b
commit 883b9ae7d2
2 changed files with 73 additions and 0 deletions
@@ -62,6 +62,15 @@ public class ShareUtils {
mime = uriAndMime.second;
}
if (uris.size() == 1) {
return new Intent(Intent.ACTION_SEND)
.setType(mime)
.putExtra(Intent.EXTRA_STREAM, uris.get(0))
.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
.putExtra(Intent.EXTRA_SUBJECT, context.getString(R.string.share_track_subject))
.putExtra(Intent.EXTRA_TEXT, context.getString(R.string.share_track_share_file_body, trackDescription));
}
return new Intent(Intent.ACTION_SEND_MULTIPLE)
.setType(mime)
.putParcelableArrayListExtra(Intent.EXTRA_STREAM, uris)