The following codec creates audio file for AAC codec with .aac extension filename - audio.aac
instead of audio.m4a
:
val contentValues = ContentValues().apply {
put(MediaStore.Audio.Media.IS_PENDING, 1)
put(MediaStore.Audio.Media.DISPLAY_NAME, "audio")
put(MediaStore.Audio.Media.DATE_ADDED, System.currentTimeMillis() / 1000)
put(MediaStore.Audio.Media.MIME_TYPE, "audio/aac")
put(MediaStore.Audio.Media.RELATIVE_PATH, "Music/My_App_Name")
}
val uri = contentResolver.insert(
MediaStore.Audio.Media.getContentUri(volume),
contentValues
)!!
Is there a way to create it with .m4a
file extension filename without renaming the file later?