Sunday, February 18, 2024

Retrofit Get Data Example In Android Studio Jetpack Compose

 Step 1: Add Dependency 

id("kotlin-kapt")
id("com.google.devtools.ksp").version("1.6.10-1.0.4")

implementation("com.squareup.retrofit2:retrofit:2.9.0")
implementation("com.squareup.retrofit2:converter-moshi:2.9.0")

implementation("com.squareup.moshi:moshi:1.15.0")
ksp("com.squareup.moshi:moshi-kotlin-codegen:1.15.0")
kapt("com.squareup.moshi:moshi-kotlin-codegen:1.15.0")

implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")

implementation("com.github.bumptech.glide:compose:1.0.0-beta01")

<uses-permission android:name="android.permission.INTERNET"/>


https://hp-api.onrender.com/api/characters

Step 2: Get Data #1



Step 3: Get Data #2





No comments:

Post a Comment

Power Of Compounding

 Power Of Compounding 1 = 1 2 = 2 3 = 4 4 = 8 5 = 16 6 = 32 7 = 64 8 = 128 9 = 256 10 = 512 11 = 1024 12 = 2048 13 = 4096 14 = 8192 15 = 163...