Fixed sharing of files from SD Card
This commit is contained in:
parent
60b740021a
commit
9a1cf7655b
1 changed files with 4 additions and 4 deletions
|
@ -56,10 +56,10 @@ object MusicUtil : KoinComponent {
|
|||
)
|
||||
).addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION).setType("audio/*")
|
||||
} catch (e: IllegalArgumentException) {
|
||||
// TODO the path is most likely not like /storage/emulated/0/... but something like /storage/28C7-75B0/...
|
||||
e.printStackTrace()
|
||||
context.showToast("Could not share this file, I'm aware of the issue.")
|
||||
Intent()
|
||||
Intent().setAction(Intent.ACTION_SEND).putExtra(
|
||||
Intent.EXTRA_STREAM,
|
||||
getSongFileUri(song.id)
|
||||
).addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION).setType("audio/*")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue