r/codedbyhand • • 10d ago

I wrote an Android app

In Kotlin, with Jetpack Compose. It is installed on my phone right now!! It is just a basic quiz/flashcard app, but it's mine. The interesting part is that none of the quiz domain data is built into the app. It is all loaded from CSV files.

I spent a few months upfront learning Kotlin from some Udemy (?) courses and a great course on YouTube.

I wrote a real Android app myself with no AI code generation.

48 Upvotes

10 comments sorted by

3

u/anxkiii 9d ago

can you tell more about the functionalities of the app ?

4

u/Objective_Buy_7235 8d ago edited 8d ago

Sure. It basically has two modes: Flashcards and Quizzes. The main data structures are Deck and Card. The data backing both modes is read in as CSV files, where a line maps to a Card and the file maps to Deck, a collection of Cards. A Card has a short question string and 2 or more potential answers. Correct answers end with \t, incorrect with \f. Multiple Decks can be loaded from the local Android filesystem and can be individually enabled and disabled. Once a .csv file has been ingested, it stays in app local storage until it is deleted. All of this makes generating new content as simple as using a text editor to build a .csv file in the correct format, upload it, and ingest it into the app.

In Flashcard mode, each Card's question is displayed and you answer out loud or in your head and then "flip" the Card using the Display button to see the first correct answer string from the Card. A future enhancement will be an optional timed mode where the answer is displayed automatically after a user defined delay. Once the answer has been displayed, a Next button advances to the next Card.

In Quiz mode, the question and all of the answers are displayed as a check box list - a multiple choice question. User selects correct answer(s) via checkboxes, then Display button to show which answer(s) are correct by appending green checkmarks and red X's to show correct and incorrect or missing answers. Next button advances to the next Card. This mode will also be getting the same optional timed feature.

Another future enhancement will be the ability to display a simple image along with question text. The image will be base64 encoded to text and sits in a field in a .csv file line.

I use it for studying music theory - which notes are in a given 3 or 4 note chord inversion. I have a .csv file for each of the 12 major and minor keys, so I can add and remove questions by key. I have a bash script that generates the csv files, creating plausible wrong answers.

1

u/anxkiii 8d ago

is it on a github?

1

u/twister726 10d ago

What were the Udemy and YouTube courses? I'd appreciate the recommendation.

2

u/Objective_Buy_7235 10d ago

I don't remember which Udemy courses or even if it was Udemy. I was just focused on learning Kotlin. On YouTube, Philipp Lackner has excellent content on Android programming. I paid for a course he offered from his channel. By far the best Android/Kotlin instruction I found.

1

u/Zerocchi 9d ago

Is Kotlin fun? I've been eyeing it for more than 12 years ago but never actually getting into it properly. The last time I wrote Android apps I was using Java and it's also eons ago.

1

u/Objective_Buy_7235 9d ago

Not really fun, but that was because it was new to me. It is similar to Java but uses lambda functions everywhere, which I initially found confusing. However, with Jetpack Compose libraries, Android development is much less of a chore. No more XML defining everything because Jetpack Compose is declarative - UI components have corresponding JC objects, and each carries parameters for the UI component. Ui pages are built up by nesting JC objects. It is really easy to get working, responsive UIs quickly. Check out Philipp Lackner's channel on YouTube to get an idea of how it works. He is a very good instructor, IMO.

1

u/Zerocchi 8d ago

I've worked with Flutter for ios apps before, so declarative UI is something I can really appreciate. Xml layouts were annoying back then. Thank you for your honest opinion and channel suggestion!

1

u/Supersupermario2 10d ago

Nice! Keep it up!

1

u/farmerbb 2d ago

Kudos to you for learning Android / Kotlin / Compose. I've been an Android dev for over a decade now, honestly Kotlin and Compose are such a joy to use and develop with - well at least they have been before all this AI nonsense started. Let me know if you have any questions as you continue your journey!