← Back to Projects
Android Development Education Local Database Quiz & History

Student Quiz App

An Android quiz application that allows users to answer questions, view quiz results, and review previous attempts. It uses local database storage to maintain quiz history and provides an option to clear saved records.

studentquiz.app
📝
Student Quiz App

Answer questions, view results, review attempts, and manage quiz history with local storage.

Tech Stack

Languages

Kotlin

Mobile Development

Jetpack Compose Android Studio

Database

Room Database

Tools and Workflow

Git GitHub

🚀 Overview

The Student Quiz App is an Android application developed with Kotlin and Jetpack Compose. It allows students to answer quiz questions, view their results immediately after completion, and review their previous quiz attempts. The app uses Room Database for local storage, so quiz history is persisted on the device and remains available even after the app is closed.

Built with a modern declarative UI using Jetpack Compose, the app provides a smooth and responsive experience. The Room database layer abstracts SQLite operations, making it easy to insert, query, and delete quiz records. Users can also clear all saved records whenever they want to start fresh.

✨ Key Features

  • Quiz Questions: Users can answer a set of quiz questions presented in a clean, interactive format.
  • Quiz Results: After completing a quiz, users immediately see their score and performance summary.
  • Review Previous Attempts: All quiz attempts are saved locally and can be reviewed at any time.
  • Local Database Storage: Room Database is used to persist quiz history on the device.
  • Clear Records: Users can delete all saved quiz records to reset their history.
  • Declarative UI: Built with Jetpack Compose for a modern, reactive user interface.
  • Offline-First: Since data is stored locally, the app works fully offline.
  • Clean Architecture: Separation of concerns between UI, business logic, and data layers.

💡 Technical Challenges

Challenge 1: Persisting Quiz History with Room

Problem: Quiz attempts needed to be saved locally so users could review them later, including across app restarts. Using raw SQLite would have required a lot of boilerplate code.

Solution: Integrated Room Database as an abstraction layer over SQLite. Defined entities for quiz records, Data Access Objects (DAOs) for CRUD operations, and a database class. Room handles schema management and reduces boilerplate significantly.

Challenge 2: Displaying and Managing Quiz History

Problem: Showing a list of previous attempts that updates in real time as new quizzes are completed, while also allowing users to clear all records, required careful state handling.

Solution: Used Room's observable queries (Flow) so the history list automatically recomposes whenever data changes. The clear records operation deletes all entries and the UI updates instantly, giving users immediate feedback.

Challenge 3: Building the Quiz Flow with Compose

Problem: Managing the quiz flow—question navigation, answer selection, score calculation, and result display—in a declarative UI framework can be complex.

Solution: Modeled the quiz state with a ViewModel and Compose state. Each screen (question, result, history) reads from and updates the state, ensuring the UI stays in sync. Score is calculated based on selected answers and stored once the quiz finishes.

📈 Outcome / Lessons Learned

Architecture & Engineering Excellence

  • Room Database Mastery: Gained practical experience with Room entities, DAOs, and database migrations.
  • Jetpack Compose: Strengthened skills in building reactive UIs with state management and composition.
  • Offline-First Design: Learned to build apps that work reliably without a network connection using local storage.

Product Impact

  • Self-Paced Learning: Students can take quizzes and track their progress over time.
  • Performance Tracking: Reviewing past attempts helps students identify areas for improvement.
  • Data Control: Users have full control over their records, with the ability to clear history anytime.

Real-World Learning

  • Local Persistence: Understood how to choose and implement the right local storage solution for an Android app.
  • State in Compose: Learned to manage complex UI state cleanly using ViewModels and observable data streams.
  • User Experience: Recognized the importance of immediate feedback and intuitive record management in mobile apps.