3 Commits

Author SHA1 Message Date
pi 64e491805c added dwarfs and removed filenameextension 2026-04-13 12:44:13 +02:00
pi e12950c25c neue musik 2026-04-12 10:25:20 +02:00
pi 7552ac1942 neue musik 2026-04-11 13:14:00 +02:00
6 changed files with 7 additions and 2 deletions
@@ -45,6 +45,11 @@ class MainActivity : Activity() {
copyRawToFiles(R.raw.hairdryer, "hairdryer.ogg", soundFolder) copyRawToFiles(R.raw.hairdryer, "hairdryer.ogg", soundFolder)
copyRawToFiles(R.raw.fezforgotten, "fezforgotten.ogg", soundFolder) copyRawToFiles(R.raw.fezforgotten, "fezforgotten.ogg", soundFolder)
copyRawToFiles(R.raw.feuer, "feuer.ogg", soundFolder)
copyRawToFiles(R.raw.dwarfs, "dwarfs.ogg", soundFolder)
copyRawToFiles(R.raw.meeresrauschen, "meeresrauschen.ogg", soundFolder)
copyRawToFiles(R.raw.regen, "regen.ogg", soundFolder)
copyRawToFiles(R.raw.zombi, "zombi.ogg", soundFolder)
val status = findViewById<TextView>(R.id.statusText) val status = findViewById<TextView>(R.id.statusText)
val input = findViewById<EditText>(R.id.timerInput) val input = findViewById<EditText>(R.id.timerInput)
@@ -56,7 +61,7 @@ class MainActivity : Activity() {
.sortedWith(compareByDescending<File> { it.name == "hairdryer.ogg" } .sortedWith(compareByDescending<File> { it.name == "hairdryer.ogg" }
.thenBy { it.name }) .thenBy { it.name })
val names = audioFiles.map { it.name } val names = audioFiles.map { it.nameWithoutExtension }
val adapter = ArrayAdapter(this, android.R.layout.simple_spinner_item, names) val adapter = ArrayAdapter(this, android.R.layout.simple_spinner_item, names)
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item) adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)
@@ -124,7 +129,7 @@ class MainActivity : Activity() {
}?.toList() ?: emptyList() }?.toList() ?: emptyList()
} }
// --- Permissions --- // --- Permissions
/* private fun checkPermissions(): Boolean { /* private fun checkPermissions(): Boolean {
val permission = if (Build.VERSION.SDK_INT >= 33) val permission = if (Build.VERSION.SDK_INT >= 33)
android.Manifest.permission.READ_MEDIA_AUDIO android.Manifest.permission.READ_MEDIA_AUDIO
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.