https://kotlinlang.org logo
#compose-desktop
Title
# compose-desktop
s

Shubhasai Mohapatra

03/11/2023, 5:44 PM
in android we used to take permission in manifest file. how can we take permission for desktop in compose multiplatform?
a

Alexander Maryanovsky

03/11/2023, 6:40 PM
There’s no such concept in compose for desktop.
s

Shubhasai Mohapatra

03/12/2023, 4:45 AM
then can we access internet directly? I mean for API calling and all
a

Adam Brown

03/12/2023, 5:36 AM
yup
Windows and Linux has no such permission requesting at all, and im not too familiar with MacOS's permission model, but either way none of it is built into Compose for Desktop.
s

Shubhasai Mohapatra

03/12/2023, 5:40 AM
Thanks a lot Adam.
@Adam Brown hey can you help actually i am using Log.d in commonMain but it is showing error in compose Multiplatform for desktop. In logcat it is showing no device connected
k

Kirill Grouchnikov

03/13/2023, 2:40 PM
Are you developing for desktop or Android?
s

Shubhasai Mohapatra

03/13/2023, 2:41 PM
for desktop
k

Kirill Grouchnikov

03/13/2023, 2:41 PM
Which package is
Log
from?
On desktop you can just use
println
as the very basic logging mechanism
s

Shubhasai Mohapatra

03/13/2023, 2:44 PM
In android it is android.util.Log but for desktop i dont know. I have used
Copy code
Log.debug(result.body().toString()) from import org.jetbrains.skia.impl.Log
but it is no showing anything
k

Kirill Grouchnikov

03/13/2023, 2:45 PM
Well, you can’t just use a random class that happens to have the “same” name and expect it to do some sort of logging for you
s

Shubhasai Mohapatra

03/13/2023, 2:46 PM
I didn't got any reference so i was trying alternative that i saw during the time of Import
s

Shubhasai Mohapatra

03/13/2023, 2:51 PM
Thanks
a

Adam Brown

03/14/2023, 7:10 AM
I've been using Napier for cross platform logging: https://github.com/AAkira/Napier
25 Views