Oliver Schröder
08/16/2024, 9:18 AM...
init {
viewModelScope.launch() {
val ca = Res.getUri("files/ca.pem")
... // use the path to the file
}
...
}
...
I have double-checked the file name and the file is where it's supposed to be. I even included the file in the androidMain/composeResources/files folder, it still cannot be found and I have no idea why. Especially since another file is read at another place in the code, which works without complains. Any ideas why that happens?
EDIT: Issue has been fixed, was unrelated to Compose Resources but instead an issue with KMQTT.Pablo
01/27/2025, 10:34 AMfilenotfoundexception
when passing it to AudioSystem.getAudioInputStream:
val uri = Res.getUri("files/frog.wav")
val audioInputStream = AudioSystem.getAudioInputStream(File(uri))