How elimu-ai/launcher works
Project type and high-level purpose
• This is a mobile-only, full-front-end Android application (“Launcher”) written in Kotlin/Java, which depends on an external Appstore app (with its own ContentProvider) to retrieve the list of educational apps.
• It has no backend servers of its own; instead it integrates with the Appstore via Android’s ContentResolver/ContentProvider mechanism.
File structure to discover architectural boundaries
• Top-level Gradle scripts & config (settings.gradle, build.gradle, gradle.properties, wrappers) define build system.
• app/src/main/java/ai/elimu/launcher contains:
• BaseApplication.kt – entry point for app-wide initialization.
• MainActivity.kt & HomeScreensActivity.kt – primary UI controllers.
• ui/ – Fragment classes for each HomeScreen.
• util/CursorToApplicationConverter.kt – transforms raw ContentProvider cursor into domain models.
• app/src/main/res holds the UI resources: layouts, drawables, styles.
README for integration details
• The Launcher fetches apps from the Appstore’s ContentProvider.
• Each “spacecraft” in the UI represents a category/unlocked skill (EGRA/EGMA).
• It depends on the external Appstore APK being installed on the device.
Main components and their interactions
a. Android Platform (OS)
b. Launcher App
– Application object (BaseApplication)
– Activities & Fragments (UI layer)
– Utility & data‐mapping layer (CursorToApplicationConverter)
– Android resources (layouts, drawables, strings)
c. Appstore App (external)
– ContentProvider exposing metadata about available educational apps
– Underlying SQLite DB or storage
Relationships / data flows
1. On startup, BaseApplication initializes global state.
2. HomeScreensActivity uses Android’s ContentResolver to query Appstore’s ContentProvider URI.
3. ContentProvider reads underlying DB, returns a Cursor.
4. CursorToApplicationConverter maps Cursor rows into Application domain objects.
Architectural patterns & principles
• Android’s component model (Application → Activity → Fragment) for lifecycle and UI separation.
• ContentProvider pattern for decoupled data sharing between separate apps.
• Utility (Converter) class encapsulates data‐mapping logic, separating UI from raw cursor data.
Essential elements
– Labels for URIs, Intent actions, and key classes