mirror of
https://github.com/SimpleMobileTools/Simple-Voice-Recorder.git
synced 2025-02-25 07:57:42 +01:00
lets use the recordings title instead of the display name, so no extension
This commit is contained in:
parent
8c982c4f3b
commit
95a0630688
@ -44,7 +44,7 @@ class PlayerFragment(context: Context, attributeSet: AttributeSet) : MyViewPager
|
|||||||
|
|
||||||
val uri = MediaStore.Audio.Media.getContentUri(MediaStore.VOLUME_EXTERNAL_PRIMARY)
|
val uri = MediaStore.Audio.Media.getContentUri(MediaStore.VOLUME_EXTERNAL_PRIMARY)
|
||||||
val projection = arrayOf(
|
val projection = arrayOf(
|
||||||
MediaStore.Audio.Media.DISPLAY_NAME,
|
MediaStore.Audio.Media.TITLE,
|
||||||
MediaStore.Audio.Media._ID
|
MediaStore.Audio.Media._ID
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ class PlayerFragment(context: Context, attributeSet: AttributeSet) : MyViewPager
|
|||||||
cursor = context.contentResolver.query(uri, projection, selection, selectionArgs, sorting)
|
cursor = context.contentResolver.query(uri, projection, selection, selectionArgs, sorting)
|
||||||
if (cursor?.moveToFirst() == true) {
|
if (cursor?.moveToFirst() == true) {
|
||||||
do {
|
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 id = cursor.getIntValue(MediaStore.Audio.Media._ID)
|
||||||
val recording = Recording(id, title, "")
|
val recording = Recording(id, title, "")
|
||||||
recordings.add(recording)
|
recordings.add(recording)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user