From 95a06306887065807d926391338cb8ad3f48584f Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 31 Mar 2020 22:59:32 +0200 Subject: [PATCH] lets use the recordings title instead of the display name, so no extension --- .../voicerecorder/fragments/PlayerFragment.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/voicerecorder/fragments/PlayerFragment.kt b/app/src/main/kotlin/com/simplemobiletools/voicerecorder/fragments/PlayerFragment.kt index 00e21b1..80618c5 100644 --- a/app/src/main/kotlin/com/simplemobiletools/voicerecorder/fragments/PlayerFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/voicerecorder/fragments/PlayerFragment.kt @@ -44,7 +44,7 @@ class PlayerFragment(context: Context, attributeSet: AttributeSet) : MyViewPager val uri = MediaStore.Audio.Media.getContentUri(MediaStore.VOLUME_EXTERNAL_PRIMARY) val projection = arrayOf( - MediaStore.Audio.Media.DISPLAY_NAME, + MediaStore.Audio.Media.TITLE, MediaStore.Audio.Media._ID ) @@ -57,7 +57,7 @@ class PlayerFragment(context: Context, attributeSet: AttributeSet) : MyViewPager cursor = context.contentResolver.query(uri, projection, selection, selectionArgs, sorting) if (cursor?.moveToFirst() == true) { do { - val title = cursor.getStringValue(MediaStore.Audio.Media.DISPLAY_NAME) + val title = cursor.getStringValue(MediaStore.Audio.Media.TITLE) val id = cursor.getIntValue(MediaStore.Audio.Media._ID) val recording = Recording(id, title, "") recordings.add(recording)