Completed2018Mobile App

Leaving Cert Maths MCQ

Educational Android app with dynamic backend, mathematical formula rendering, and dual quiz modes

Android (Java)SQLiteRESTful APIJSONMaterial DesignAndroid Studio
Maths MCQ app icon

Overview

This Android app provides multiple-choice quizzes for Irish Leaving Certificate mathematics students.

The app features a dynamic backend for content updates, proper mathematical formula rendering, and two distinct learning modes. Questions were vetted by a qualified secondary mathematics teacher with over 15 years of experience.

The project was built for the Multimedia and Mobile Application Development module at NCI. Whilst meeting the assignment requirements, I deliberately chose more complex technical approaches where they provided genuine value for the use case.

Navigation drawer pattern with home and about screens

The Backend Decision

A critical early decision was how to deliver quiz content to the app. The obvious approaches were hardcoding questions in the app or bundling them as a JSON file. Both would have been simpler to implement. Instead, I built a full RESTful API backend.

This added significant complexity, but it was the right choice for an educational app. Questions could be updated, corrected, or expanded without requiring users to update the app. New topics could be added as the curriculum evolved.

The app retrieves questions from a RESTful API in JSON format. Users sync to get new questions without app updates. The backend allows dynamic addition and removal of questions, enabling continuous content improvement. If started without internet connectivity or with no cached questions, the app prompts for a sync automatically.

Sync flow with loading states and error handling

The app parses questions from the API and stores them in a local SQLite database. This allows efficient querying: loading only categories for the selection screen, or only questions for a specific category during a quiz, rather than keeping everything in memory.

Difficulty Differentiation

The Leaving Certificate has three levels: Higher, Ordinary, and Foundation. Questions are categorised by level, and the app remembers the user's preference across sessions.

The category selection screen shows maths topics (Algebra, Co-ordinate Geometry, Complex Numbers, Differentiation, Statistics, Trigonometry) with tabs for level selection. Personal best scores are colour-coded from red to green, providing instant visual feedback on progress. If more than two categories are available, a "Random" option appears, drawing questions from all topics to test overall curriculum knowledge.

Categories with colour-coded personal best scores

Dual Quiz Modes

The app offers two distinct modes designed for different learning stages. This required substantial additional code: separate logic for hint display, different summary screens, a scoring system, and personal best persistence. But the educational value was clear.

Clear mode selection with explanations of each mode's behaviour

Study Mode

  • Unlimited attempts per question
  • Hints available after two incorrect attempts
  • Hint button always visible for on-demand help
  • No score recording for low-pressure learning

Test Mode

  • Single attempt per question
  • No hints available
  • Score recorded and displayed at end
  • Personal best tracking across sessions
Study Mode shows hints; Test Mode removes the hint button and allows only one attempt

Quiz Interface

The quiz screen displays the selected category and mode, current question index, and total questions. Questions can include images (downloaded dynamically), and answers are colour-coded on selection: green for correct, red for incorrect.

Each time a quiz starts, both question order and answer order are shuffled. This prevents memorising sequences and forces genuine engagement with the material.

Annotated quiz interface showing all interactive elements

Mathematical Formula Rendering

Displaying mathematical notation naturally was one of the most challenging features to implement. Maths questions contain fractions, exponents, trigonometric functions, and calculus notation. The quiz mode comparison above shows this in action: expressions like 4x√x and fractions are rendered properly rather than as plain text.

Rendering mathematical notation correctly makes a significant difference for student comprehension. The implementation detected mathematical content in questions and rendered it appropriately using specialised UI components.

Contextual Feedback

After completing a quiz, users see a summary screen tailored to their mode and performance. In Study Mode, the summary congratulates completion and encourages testing knowledge in Test Mode. In Test Mode, the summary shows the score with a colour-coded progress bar and contextual feedback: congratulations for high scores, encouragement for moderate scores, or a suggestion to revisit Study Mode for low scores.

Buttons allow retrying the quiz or changing mode, creating a natural learning loop.

Summary screens adapt messaging based on mode and performance

Hardware Integration

The app integrates with device hardware for file storage and audio feedback. Question images are downloaded and stored locally for offline access, requiring runtime permission requests (Android 6.0+).

Audio provides immediate feedback: a positive sound for correct answers, a negative sound for incorrect ones. Sounds play on the STREAM_MUSIC channel, respecting volume controls and audio priority.

Progressive permission requests with contextual explanations, and locally stored question images

Content Quality

The questions weren't generated or scraped. They were curated and vetted by a qualified secondary mathematics teacher and examiner with over 15 years of experience teaching the Leaving Certificate curriculum. This ensured alignment with actual exam expectations and appropriate difficulty calibration.

Technical Implementation

The app was built in Java for Android with a minimum API level of 23 (Android 6.0). Key technical aspects:

Navigation Drawer

Fragment-based UI with reusable components

SQLite Database

Local storage for offline functionality

Async Networking

Background tasks for API calls and image downloads

Image Caching

Downloaded question images stored locally

Audio Feedback

Sound effects on STREAM_MUSIC channel

Runtime Permissions

Two-stage requests with contextual explanations

Testing covered phone, 7-inch tablet, and 10-inch tablet form factors via emulators (Nexus 5X, Nexus 7, Nexus 10).

Reflections

This was a good opportunity to go beyond the assignment requirements. The backend added complexity but made more sense for an app where content would need updating. The dual quiz modes were extra work but felt worth it for the learning use case.

The maths rendering was trickier than expected. Generic text display wasn't going to work for fractions and exponents, so I had to find a solution specific to the problem. Working with a maths teacher on the questions also helped ensure the content was actually useful rather than just technically functional.