Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/aliammari1/readrealm/llms.txt

Use this file to discover all available pages before exploring further.

The Android client is a native Kotlin + Jetpack Compose app targeting Android API level 30 (Android 11) and above.

Prerequisites

  • Android Studio Koala Feature Drop (2024.1.2) or later
  • Android SDK API 30+
  • Gradle 8+
  • Kotlin 1.9+
  • JDK 11+
Android Studio bundles the Android SDK, Gradle wrapper, and a compatible JDK. Installing Android Studio is the easiest way to satisfy all prerequisites.

Setup

1

Clone the repository

git clone https://github.com/aliammari1/readrealm.git
cd readrealm
2

Configure the API URL

The Android client connects to the ReadRealm backend via Retrofit. The base URL is defined in apps/android/app/src/main/java/tn/esprit/libraryapp/api/RetrofitService.kt:
apps/android/app/src/main/java/tn/esprit/libraryapp/api/RetrofitService.kt
object RetrofitService {
    private const val BASE_URL = "https://libraryapp-nest-back.vercel.app/"
    // ...
}
To connect to a local API server, change BASE_URL to point to your machine’s address:
private const val BASE_URL = "http://10.0.2.2:3000/"
Android emulators route 10.0.2.2 to the host machine’s localhost. Use this address when running the API locally with task api:dev or docker-compose up. On a physical device, use your machine’s local network IP address instead.
3

Build the debug APK

cd apps/android
./gradlew assembleDebug
The compiled APK is output to apps/android/app/build/outputs/apk/debug/app-debug.apk.
4

Install on a device or emulator

Connect an Android device via USB (with USB debugging enabled) or launch an emulator, then run:
cd apps/android
./gradlew installDebug

Additional Gradle commands

ActionCommandTask equivalent
Clean build directory./gradlew cleantask android:install
Build release APK./gradlew assembleReleasetask android:build:release
Run unit tests./gradlew testtask android:test
Run instrumentation tests./gradlew connectedAndroidTest
All Gradle commands must be run from the apps/android directory, or you can use the task equivalents from the project root.

Build docs developers (and LLMs) love