AKKA library in android studio Koltin project

Hello friends,
I am new to AKKA, and I want some examples of how to use the Akka library in the android studio project. I just want to use the AKKA library instead of Retrofit. is it possible? please share your knowledge.

Hi @vazand,

I think is not a good idea for a few reasons.

Akka is built on top of Scala and if I recall correctly, using Scala libraries for Android might be challenging due to the extra storage usage. Scala jars are larger than Java and in addition to that your application will also require the scala-std.

But I’m not familiar with Android development so it might be that this is not an issue anymore.

Another reason is that Akka is a toolkit for build highly concurrent distributed systems. An Android application doesn’t qualify as a distributed system.

Now, on the other hand, if you are also building the backend server that will serve your Android application, then Akka might be a good fit for you, but on the server side, not on the client mobile application.

I hope this clarifies.

Cheers

1 Like

It’s possible but your apk will be bigger:)

1 Like

Hi @hepin1989 thanks for the reply. You said It’s possible. Have you ever implemented the Akka-HTTP library in an Android project? If so, can you please give an example?

I was implemented something like airdrop in android in the past, which is a part of the $work project.
And I think you can use both Netty and Akka-http for this, and I suggest you to use Netty because its dependencies is much less.