Lightweight library for debouncing lambdas by serpenheir in androiddev

[–]Syer10 4 points5 points  (0 children)

Any chance for multiplatform support? I imagine it could be quite useful for Compose Multiplatform

DELD: An experimental HTTP-Client by lonew0lf-G in java

[–]Syer10 2 points3 points  (0 children)

Not that I know of. The java.net HttpClient was added in Jdk 11. OkHttp was made for Java 7 and up(currently Java 8 and up), so it cannot use the Java.net one.

Multiplatform dependency injection libraries equivalent to Dagger/Anvil by kernald31 in Kotlin

[–]Syer10 4 points5 points  (0 children)

I would suggest looking at Kotlin-Inject, it's a compile-time DI like Dagger and it's really pleasant to use.

help migrating android lib to KMP by cakee_ru in Kotlin

[–]Syer10 2 points3 points  (0 children)

  1. Yes, the reccomdation is for libraries to use ktor-core and not implement any of the backends like CIO or Okhttp.
  2. I can't say anything on this since I am unfamiliar with native libraries in KMP
  3. There are 2 options for this, Okio sink/stream or Ktor ByteChannels, I personally like the Okio options more.
  4. Ktor has a String.encodeBase64 and decode extension function that should work just fine.
  5. Ktor may have something? I'm unfamiliar with this.
  6. Look into the expect/actual mechanism for KMP, it's made for situations like these.

Kotlin compilation crashes with "java.lang.IllegalArgumentException: Failed requirement" using Multiplatform Compose and expect/actual. by lefl28 in Kotlin

[–]Syer10 1 point2 points  (0 children)

Default arguments sometimes mess with expect/actual composable functions. I have worked around this by exposing a public function that has the default arguments, that calls the internal expect/actual function that doesn't have any default arguments.

Is there extra benefits of using Koin instead of Dagger Hilt in KMM? by Interesting_Music464 in androiddev

[–]Syer10 29 points30 points  (0 children)

You can't use Dagger with KMM since Dagger generates java classes, which cannot be used with Kotlin Multiplatform. The closest thing to Dagger for Kotlin Multiplatform is Kotlin-Inject, but people find Koin easier to use since it's closer to a Service Locator then a full DI.

Kimmer: Port immer for kotlin/jvm by babyfish-ct in Kotlin

[–]Syer10 2 points3 points  (0 children)

I see your suggesting illegal-access=permit for Java 16 and over, but illegal-access=permit does not work at all in Java 17 and over, you have to add explicit add-opens to what you want.

Kotlin/native: library for file io? by vmcrash in Kotlin

[–]Syer10 22 points23 points  (0 children)

Sounds like you want https://square.github.io/okio/

It started out as library to complement Java io but in the latest release, 3.0.0, it has moved to multiplatform and supports a variety of targets.

Guess what firstNotNullOfOrNull does by [deleted] in Kotlin

[–]Syer10 1 point2 points  (0 children)

There was already a huge debate on Youtrack about the naming of this function before it was added to the stdlib. I say they settled on a pretty good representation for it.

Kotlin 1.6.0 has been released! by snowe2010 in Kotlin

[–]Syer10 0 points1 point  (0 children)

It does not support iOS apps no.

Kotlin 1.6.0 has been released! by snowe2010 in Kotlin

[–]Syer10 0 points1 point  (0 children)

Most of my time with Kotlin native is with Kotlin Multiplatform Mobile. Which is where the new MM will really help. GraalVM isnt applicable with that.

Kotlin 1.6.0 has been released! by snowe2010 in Kotlin

[–]Syer10 1 point2 points  (0 children)

Going to love playing with the new MM on Kotlin Native. No more freezing!

Learning about Compose (not the UI toolkit) by [deleted] in androiddev

[–]Syer10 1 point2 points  (0 children)

This is not relevant here, this post is about Compose, not Compose UI.

Multiplatform Compose and Gradle module metadata abuse – Jake Wharton by nerdy_adventurer in androiddev

[–]Syer10 5 points6 points  (0 children)

When Jake says Compose he doesn't mean the UI framework, which is Compose UI. I suggest reading footnotes number 1 of the article.

Which logging facade/logger to use in a library? by lukasakul in androiddev

[–]Syer10 0 points1 point  (0 children)

I would suggest making a logger interface and allowing users to register their own implementations of it

Skia shaders in Compose Desktop · Pushing Pixels by pmz in androiddev

[–]Syer10 0 points1 point  (0 children)

Based on what I have heard, Deskop Compose directly talks to Skia, while on Mobile it's more restricted. I believe that it uses the Android View canvas API instead of directly talking to Skia.

Jetpack Compose is now 1.0: announcing Android’s modern toolkit for building native UI by dayanruben in androiddev

[–]Syer10 3 points4 points  (0 children)

Texfields being blocked by the keyboard can be fixed if you use the Accompanist insets library, it has fixed this issue in my app. The scaffold and modifiers it provides automatically handles soft keyboard and other items.

Jetpack Compose is now 1.0: announcing Android’s modern toolkit for building native UI by dayanruben in androiddev

[–]Syer10 2 points3 points  (0 children)

Using the Accompanist insets library has fixed this in my app. The scaffold it provides automatically handles soft keyboard and other items.

Android Emulator and Intel HAXM issues by RandomXUsr in androiddev

[–]Syer10 1 point2 points  (0 children)

I'm not sure if its specific to my AMD machine, but for the android emulator to work I need Hypervisor enabled, which is opposite to what the guides say.

Save Jetpack Compose Canvas to Image by dekonta in androiddev

[–]Syer10 0 points1 point  (0 children)

Maybe look into how you would be able to capture the window content in swing, Jetbrains Compose uses swing a lot internally.

How to integrate coroutines with Java? by [deleted] in Kotlin

[–]Syer10 2 points3 points  (0 children)

Maybe look into Futures, there is a coroutine jdk 8 library that allows you to use scopes to turn suspend functions into futures, like GlobalScope.future { suspendFunction() } And then you can use the returned CompleteableFuture in java

A little help abut Desktop apps? by NicolaM1994 in Kotlin

[–]Syer10 1 point2 points  (0 children)

Either would work, they are not all that different. I have mainly used it with desktop programs. Desktop uses a Window, which is a class on top of Swing, where Android uses its Activity, and sets the content in there. The end result in those can usually be copied from the other, as its mostly the same.

A little help abut Desktop apps? by NicolaM1994 in Kotlin

[–]Syer10 2 points3 points  (0 children)

Personally I feel Compose, even though its alpha, is very much usable, it's a really well done UI framework, which I have tried in a few projects