https://kotlinlang.org logo
Title
j

Javier

09/10/2021, 8:54 AM
Is there a common function to load local resources or I have to create an expect actual?
i

Igor Demin

09/10/2021, 9:06 AM
Currently there is no common function for that
j

Javier

09/10/2021, 9:11 AM
Is it planned or is there an example about it? Android use
R
and desktop
File
so I don’t know if I can do an expect actual easily
i

Igor Demin

09/10/2021, 9:25 AM
Is it planned
We just thought about it, but didn't plan specific actions
example about it
You can find an example here: common android desktop
:thank-you: 1
👀 1
m

Michael Paus

09/10/2021, 12:10 PM
The good old Java way like
getClass().getResourceAsStream
works on Android as well. So, as long as there is no better way this can at least be used on both platforms.
👍 2