Libraries and Frameworks Used in alfaazplus/quranapp: Complete Android Tech Stack

The alfaazplus/quranapp project is built with Kotlin and Jetpack Compose, utilizing a comprehensive suite of libraries including Retrofit for networking, ExoPlayer for media, and SmoothRefreshLayout for UI interactions, all managed through Gradle Version Catalogs.

The QuranApp Android application demonstrates modern Android development practices by integrating declarative UI frameworks with robust networking and media handling capabilities. According to the source code in the alfaazplus/quranapp repository, the project leverages third-party dependencies declared in app/build.gradle.kts and centrally managed via gradle/libs.versions.toml. This article examines the specific libraries powering the application’s architecture.

Jetpack Compose and Modern UI Stack

The application adopts Jetpack Compose as its primary UI framework, enabling fully declarative interface development.

Declarative Interface Components

In app/build.gradle.kts (lines 92‑104), the project imports the complete Compose Bill of Materials (composeBom = "2024.09.02"), including:

  • androidx.compose.runtime and androidx.compose.ui for core composable infrastructure
  • androidx.compose.foundation and androidx.compose.material3 for Material Design 3 components
  • androidx.compose.ui:ui-tooling for development-time preview support
  • androidx.compose.runtime:runtime-livedata for reactive data binding

The project also includes a local UI library module via project(":peacedesign") declared at line 90, which houses shared design components used throughout the application.

@Composable
fun QuranVerseScreen(verse: String) {
    Scaffold(
        topBar = { TopAppBar(title = { Text("Quran Verse") }) }
    ) {
        Text(
            text = verse,
            style = MaterialTheme.typography.bodyLarge,
            modifier = Modifier.padding(16.dp)
        )
    }
}

Networking Layer and Data Serialization

For API communication, the application implements Retrofit 2 combined with Kotlinx Serialization, configured in app/build.gradle.kts (lines 129‑133).

This stack includes:

  • com.squareup.retrofit2:retrofit for HTTP client operations
  • org.jetbrains.kotlinx:kotlinx-serialization-json for JSON parsing
  • com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter for seamless integration between Retrofit and Kotlinx Serialization
interface QuranApi {
    @GET("quran/verses/{surah}/{ayah}")
    suspend fun getVerse(
        @Path("surah") surah: Int,
        @Path("ayah") ayah: Int
    ): VerseResponse
}

val retrofit = Retrofit.Builder()
    .baseUrl("https://api.quran.com/")
    .addConverterFactory(Json { ignoreUnknownKeys = true }.asConverterFactory("application/json".toMediaType()))
    .build()

val api = retrofit.create(QuranApi::class.java)

Media Playback Infrastructure

Audio recitation features rely on ExoPlayer, the high-performance media playback library from Google. The dependencies are specified in app/build.gradle.kts (lines 119‑122):

  • exoplayer-core for base playback engine
  • exoplayer-ui for standard player interface components
  • extension-mediasession for media session and notification integration
val player = ExoPlayer.Builder(context).build().apply {
    setMediaItem(MediaItem.fromUri("https://example.com/recitation.mp3"))
    prepare()
    playWhenReady = true
}

// In a Compose UI
AndroidView(factory = { PlayerView(context).apply { player = this@apply } })

Core AndroidX Libraries and Architecture

The foundation of the app rests on extensive AndroidX support libraries declared in app/build.gradle.kts (lines 105‑118).

Lifecycle and Background Processing

Key architectural components include:

  • androidx.lifecycle:lifecycle-runtime-ktx, lifecycle-service, and lifecycle-viewmodel-compose for lifecycle-aware components
  • androidx.work:work-runtime-ktx (lines 144‑146) for deferred background task scheduling
  • androidx.core:core-ktx and androidx.activity:activity-ktx for Kotlin extensions and activity result handling

Data Persistence with DataStore

For type-safe key-value storage, the project uses androidx.datastore:datastore-preferences (line 144), replacing traditional SharedPreferences with a coroutines-friendly solution.

UI Enhancement Libraries

Beyond standard Compose components, the application incorporates SmoothRefreshLayout for advanced pull-to-refresh functionality, configured in app/build.gradle.kts (lines 134‑141).

The implementation includes:

  • srl-core for base refresh mechanics
  • srl-ext-classics, srl-ext-material, and srl-ext-dynamic-rebound for visual header styles
  • srl-ext-horizontal and srl-ext-two-level for specialized layout behaviors
SmoothRefreshLayout(
    onRefresh = { /* reload data */ },
    header = ClassicHeader()
) {
    LazyColumn {
        items(verseList) { verse ->
            Text(verse.text, modifier = Modifier.padding(8.dp))
        }
    }
}

Material Design and View Binding

Additional UI utilities declared in app/build.gradle.kts (lines 123‑128) include:

  • com.google.android.material:material for Material Design components not yet available in Compose
  • com.android.databinding:viewbinding for view binding generation in legacy XML layouts
  • org.apache.commons:commons-lang3 and com.google.guava:guava for string manipulation and collection utilities

Build Configuration and Dependency Management

The project employs Gradle Version Catalogs to centralize dependency versions. All library versions are defined in gradle/libs.versions.toml (lines 31‑88), providing a single source of truth for upgrades.

Notable version entries include:

  • androidx-coreKtx = "1.15.0"
  • composeBom = "2024.09.02"

The build also enables core library desugaring via com.android.tools:desugar_jdk_libs (line 123), allowing modern Java APIs to function on older Android runtime versions.

Summary

  • Primary Language and UI: Kotlin with Jetpack Compose (Material 3) forms the core development stack, declared in app/build.gradle.kts lines 92‑104.
  • Networking: Retrofit 2 with Kotlinx Serialization handles API communication and JSON parsing (lines 129‑133).
  • Media: ExoPlayer powers audio recitation playback with media session support (lines 119‑122).
  • Architecture: AndroidX Lifecycle, WorkManager, and DataStore manage application state and background operations (lines 105‑118, 144‑146).
  • UI Enhancements: SmoothRefreshLayout provides advanced pull-to-refresh capabilities (lines 134‑141).
  • Build System: Gradle Version Catalogs in gradle/libs.versions.toml centrally manage all dependency versions for consistent upgrades.

Frequently Asked Questions

What networking library does alfaazplus/quranapp use for API calls?

The application uses Retrofit 2 (com.squareup.retrofit2:retrofit) combined with Kotlinx Serialization for JSON parsing. This configuration appears in app/build.gradle.kts at lines 129‑133, utilizing retrofit2-kotlinx-serialization-converter for type-safe API responses without reflection-based parsers.

How does the QuranApp handle audio playback for recitations?

Audio functionality relies on ExoPlayer, specifically the core, UI, and media session extensions declared at lines 119‑122 in app/build.gradle.kts. This library provides high-performance audio streaming with support for background playback controls through the media session extension.

Does the project use Jetpack Compose or traditional XML layouts?

The project primarily uses Jetpack Compose for its user interface, importing the Compose Bill of Materials version 2024.09.02 along with Material 3 components as shown in app/build.gradle.kts (lines 92‑104). However, it maintains view binding capabilities (com.android.databinding:viewbinding) for any remaining XML-based components.

Where are the dependency versions managed in the QuranApp repository?

All library versions are centralized in gradle/libs.versions.toml (lines 31‑88) using Gradle Version Catalogs. This file serves as the single source of truth for version numbers, while app/build.gradle.kts references these catalog entries, making dependency upgrades consistent across the multi-module project including the local :peacedesign module.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →