fix file sharing on Android below Q

This commit is contained in:
tibbi
2020-05-20 23:28:28 +02:00
parent 674ea18fc5
commit 490d247344

View File

@ -99,7 +99,13 @@ class RecordingsAdapter(activity: SimpleActivity, var recordings: ArrayList<Reco
}
private fun shareRecordings() {
val paths = getSelectedItems().map { getAudioFileContentUri(it.id.toLong()).toString() }
val selectedItems = getSelectedItems()
val paths = if (isQPlus()) {
selectedItems.map { getAudioFileContentUri(it.id.toLong()).toString() }
} else {
selectedItems.map { it.path }
}
activity.sharePathsIntent(paths, BuildConfig.APPLICATION_ID)
}