Hi everyone! Coming from an iOS background and wri...
# android
s
Hi everyone! Coming from an iOS background and writing an android version of one of the apps. What are the community recommendations for : Networking library, and keyboard managers (this is an issue in iOS as the keyboard can sometimes cover an input when the keyboard comes into view). Any more gotchas that you can think of? Much appreciated 🙂. Should mention I’m interested in Kotlin libs (if important).
m
Retrofit for Rest, this comes with OkHttp, Gson or Moshi for json parsing
for keyboard handling, nothing special the sdk tool work just fine
s
When you say “or”, it comes with all three under the hood?
m
only comes with okhttp, then you can choose the parser you prefer
if you search for retrofit example, you will find everything you need to make network request for Rest api, if that is what you need
if you need too handle images then I recommend Glide
s
thanks man 😃
i
I thought Retrofit is JVM only. Ktor have OkHttp for JVM/Android and iOS (URLSession) one
b
@itnoles is right, Retrofit is JVM only
“Type-safe HTTP client for Android and Java by Square, Inc.”
The counterpart from ktor is also available for iOS. It could help when you already have ios background. (https://ktor.io/clients/http-client/engines.html) Perhaps you should also take a look into Kotlin Multiplatforms, where you can share code between ios and JVM applications if you plan to write for both platforms: https://kotlinlang.org/docs/reference/multiplatform.html
l
Gson -> kotlinx.serialization or Moshi
Retrofit -> or also #ktor client
k
ktor & kotlinx.serialization have the added benefit of working with kotlin/native, if that becomes of interest in the future
s
I’m surprised no one has mentioned Fuel, as it was one of the first things that google returned.
i
Fuel is JVM/Android projects.
s
Thanks ^^ was looking for specifically android actually 😅 my bad
i
Fuel is very interesting kotlin library with a lot of features including Android.