DEV Community

Hatsumi Mihari
Hatsumi Mihari

Posted on

Happy New Year, community!

Hello everyone who comes across this blog, and Happy New Year!
This blog is my personal journey into Android development.
Previously, I worked with web development as a hobby and also developed software for ESP32 family microcontrollers, so this path is not entirely “from scratch”.
I’ll be happy to receive any feedback, advice, or suggestions - thank you in advance.

Getting started

The final goal of this project is an application with a purely decorative purpose - an audio spectrum visualizer.
The audio stream will be captured from a host (for example, a PC), and the analysis will be performed either on the host or on the client, depending on the performance of the device.

At the moment, this is only the concept of the final application.
I also have a design prototype that was originally created for a desktop web application, but later I plan to adapt it to Material 3 and a touch-based Android interface.

The learning app

As a first learning step, I 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.

Application logic

  • 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 process and issues

The development took about two days, mostly spent getting familiar with the tools and the SDK.
Because Android Studio and the emulator consume a significant amount of resources, the emulator worked correctly only a few times before it stopped launching altogether. I haven’t figured out the cause of this behavior yet.
As an alternative, I used real 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.

Identified 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). I haven’t fully figured it out yet - 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 q*uite 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.
GitHub (https://github.com/Hatsumi-Mihari/android-learning-new-year)

Top comments (0)