Happy New Year, community!
Source: Dev.to
Introduction
Hello everyone who comes across this blog, and Happy New Year!
Project Overview
The final goal of this project is an application with a purely decorative purpose – an audio spectrum visualizer.
At the moment, this is only the concept of the final application.
First Learning Step
Implemented a simple application that consists of:
- Three text fields
- One button that increments a value
In honor of the New Year, the app includes a small Easter egg: if the button is pressed 26 times, music starts playing.
Fields
- First field – displays text that changes when the value reaches 26, at which point music starts playing.
- Second field – a timer that counts the time since the app was launched (updated every 250 ms).
- Third field – a button press counter (also used as the trigger for the Easter egg).
Development Details
The development took about two days, mostly spent getting familiar with the tools and the SDK.
Devices
- Xiaomi Redmi Note 11 NFC (2022) – Android 13 (custom ROM)
- Xiaomi Mi 5 (2016) – Android 14 (custom ROM)
For device control, I use AnyDesk (AD1). The application runs on both devices, but with some caveats.
Issues
Suspected Memory Leak
The profiler shows a sawtooth‑shaped memory usage graph. I suspect this is related to JVM behavior and UI state updates (possibly StateFlow). This is still a hypothesis.
Crash During Audio Playback
The app crashes after the first audio playback when the value reaches 26, but it does not crash if the value exceeds 26. Most likely, the issue is caused by repeatedly recreating the audio playback process. This needs to be fixed.
Conclusion
Despite the presence of bugs (including critical ones), I consider the result quite decent for the first two days of learning Android development.
If there is interest, I can share a link to the project repository. I do not plan to maintain or update it in the future – this is purely a learning project created to explore the development environment and its limitations.