Node.js

Set Up Android Dependencies

Adding Dependencies

Open app/build.gradle.kts (or .gradle) and add the following dependencies:

dependencies {
    // Compose and UI
    implementation("androidx.activity:activity-compose:1.9.3")
    implementation(platform("androidx.compose:compose-bom:2024.11.00"))
    implementation("androidx.compose.ui:ui")
    implementation("androidx.compose.material3:material3")

    // Networking with OkHttp and JSON parsing with Gson
    implementation("com.squareup.okhttp3:okhttp:4.12.0")
    implementation("com.google.code.gson:gson:2.10.1")

}

Click Sync Now to download the libraries.

Why These Libraries?

  • Compose Libraries: For creating modern and responsive UI components.
  • OkHttp: To make HTTP requests to our backend server.
  • Gson: To handle JSON serialization and deserialization.

Setting Up Internet Permissions

In AndroidManifest.xml, add the following permission at the top (within the <manifest> tag):

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

We need internet access to communicate with our backend server and send verification requests.