https://kotlinlang.org logo
#android
Title
# android
s

scottiedog45

03/01/2019, 1:15 AM
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

Michael Bernier

03/01/2019, 1:17 AM
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

scottiedog45

03/01/2019, 1:17 AM
When you say “or”, it comes with all three under the hood?
m

Michael Bernier

03/01/2019, 1:19 AM
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

scottiedog45

03/01/2019, 1:56 AM
thanks man 😃
i

itnoles

03/01/2019, 5:20 AM
I thought Retrofit is JVM only. Ktor have OkHttp for JVM/Android and iOS (URLSession) one
b

Bino

03/01/2019, 7:21 AM
@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

louiscad

03/01/2019, 8:40 AM
Gson -> kotlinx.serialization or Moshi
Retrofit -> or also #ktor client
k

Kris Wong

03/01/2019, 1:57 PM
ktor & kotlinx.serialization have the added benefit of working with kotlin/native, if that becomes of interest in the future
s

scottiedog45

03/02/2019, 5:41 PM
I’m surprised no one has mentioned Fuel, as it was one of the first things that google returned.
i

itnoles

03/02/2019, 5:45 PM
Fuel is JVM/Android projects.
s

scottiedog45

03/02/2019, 5:51 PM
Thanks ^^ was looking for specifically android actually 😅 my bad
i

itnoles

03/02/2019, 6:52 PM
Fuel is very interesting kotlin library with a lot of features including Android.
6 Views