Skip to content

Bokang9/FlashHack2

Repository files navigation

Flash-Hack Overview

Flash-Hack is a native Android application that’s developed in Kotlin language using Android Studio, it’s designed as an interactive “Life Hack or Urban Myth” flashcard game. The app tests the users’ ability to distinguish between genuine, safe productivity tips and viral internet rumours by presenting a series of hack statements. The user selects “Hack” or “Myth” for each card, receives immediate feedback, and earns a final score with personalized results. Flash-Hack makes learning critical thinking and everyday shortcuts engaging, while promoting digital literacy and safe real-world practices.

img.png

Purpose of Flash-Hack

The purpose of Flash-Hack is to strengthen users’ ability to think critically about the tips and claims they see online. In a digital world where life hacks and viral rumours spread quickly, many people struggle to tell what is genuinely helpful and safe from what is misleading and false. Flash-Hack exists to close that gap by training users to recognize real, practical shortcuts while learning to question or reject myths. The core purpose is to help users study, verify and internalize safe real-world shortcuts through an interactive flashcard quiz. The app aims to build better digital literacy and everyday decision-making, so users can navigate online information with more confidence and to avoid wasting time or risking harm from bad advice.

Design consideration of Flash-Hack

Hack-Item data class

A data class in Kotlin is a class that is used primarily to hold data. The Hack-Item data class was designed as the core data model for Flash-Hack’s “Life Hack or Urban Myth” quiz, with each property serving a specific role in the app’s purpose. Kotlin data classes auto-generate the equals (), hash Code (), and the copy (). This was chosen to reduce boilerplate, and it makes it easy to compare Hack-Item objects, store them in lists and pass them between screens like question screen – score screen – review screen. It also helps reduce the bugs. The “statement: String” holds the actual life hack pr myth text displayed on each flashcard. This is the main content users react to when deciding “Hack” or “Myth”, so it basically drives the app’s core quiz mechanic. The “is-Hack: Boolean” stores the truth value of the statement. Using Boolean makes checking answers simple and fast: if the users taps “Hack”, you just check user Choice == hack-Item.is-Hack. The comment // true = Hack, false = Myth which makes the logic clear for anyone maintaining the code. This property is what lets the app calculate the total score. The “explanation: String” provides the reasoning shown in immediate feedback like “Correct! That’s a real time-saver!” and in the review screen.

img_2.png

val hacks-list

The listOf () function is used to create a fixed, immutable list. This means that once the list is created, we cannot add, remove or update its elements. val hacks-list = remember {listOf (….)} was chosen to give Flash-Hack a stable, unchangeable, efficient question bank. The immutability protects quiz integrity, remember keeps the user experience consistent, and Hack-Item gives you the exact data structure that is needed to test “Hack or Myth”. All this directly serves the purpose of the app: helping the users practice spotting real tips vs online misinformation in a controlled, repeatable way.

img_3.png

If, when and else in Flash-Hack

When is a conditional expression that runs code based on the multiple possible values or conditions. When evaluates its argument and compares the result against each branch in order until one of the branch conditions is satisfied. When expression controls Flash-Hack’s core navigation by branching on current Screen values like “welcome”, “quiz” and “score”. This design keeps the user flow linear and predictable – start, answer, see results and review. The if is used to specify whether a block of statements will be executed or not, if the condition is true then only the statement or the blocks of statements will be executed otherwise it fails to execute. The if expression is used as a value-returning construct for immediate learning: feedbackMessage = if (isCorrect) {score ++; “Correct! That’s a real time-saver!} else {“Wrong! That’s just an urban myth!”}. The else is required here because kotlin’s if as an expression must cover all the outcomes, ensuring no answer goes without feedback.

img_4.png

Score Screen

The score screen logic is designed to turn the quiz results into personalized motivation. The percentage is calculated with the if (totalQuestions > 0) (score * 100) / totalQuestions else 0 to avoid division errors and to give the users a clear measure of how well they distinguished hacks from the fiction. Two when expressions tier feedbackTitle and feedbackMessage based on the percentage the user got – “Master Hacker!’” down to “Keep practicing!” – ensuring evevry score gets encouraging and non-shaming feedback. The with onReviewClick and onRetakeClick callbacks, the screen pushes the users to learn from their errors and to practice again. img_5.png

Conclusion

Flash-Hack demonstrates how targeted app design can turn everyday scrolling habits into an active learning experience. As a native Android application built using the Kotlin language, it uses an interactive flashcard quiz format to directly address the challenges of distinguishing between genuine and safe productivity tips from misleading viral myths. Ultimately, Flash-Hack makes critical thinking engaging and repeatable, equipping every user with the skills to question or reject misinformation, internalize practical shortcuts and navigate online content with greater confidence. The project shows that simple and focused mobile experiences can have a meaningful impact on everyday media literacy and helps the user to avoid wasting time or risking harm from bad advice.

References

link for FlashHack youtube video https://youtu.be/ugaJzHbhnlg

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages