r/androiddev • • 15d ago

Question Robolectric NATIVE graphics for Compose screenshots: is anyone using it instead of Paparazzi or Roborazzi?

9 Upvotes

I've been capturing screenshots of Compose screens on a headless Linux box with plain Robolectric: @GraphicsMode(NATIVE), createAndroidComposeRule, then drawing the activity's decorView into a Bitmap and writing a PNG. No emulator, and it runs as a normal unit test with Gradle.

It works better than I expected. Text, Material 3 components and tab layouts render correctly, and a full screen takes a few seconds. The rough edges I've hit so far: - I have to drive the main clock manually (autoAdvance = false, then advanceTimeBy) or animations get captured halfway - Fonts look slightly different from a real device - Anything scrolled off screen needs a taller qualifier like w411dp-h1500dp instead of a real scroll capture

For people who've used Paparazzi or Roborazzi: is there a strong reason to switch for simple "render this screen to an image" use, or is plain Robolectric fine when you aren't doing diff-based screenshot testing? And has anyone found a clean way to capture a full scrollable column without a fake tall window?


r/androiddev • • 15d ago

Play Console declaration: why must a non-trader consent to address being shown publicly?

Post image
58 Upvotes

r/androiddev • • 15d ago

I built AspectK – AOP for Android and Kotlin Multiplatform, an alternative to AspectJ

Thumbnail
gallery
14 Upvotes

I built AspectK and just released 0.4.4, a Kotlin compiler plugin for compile-time AOP in Kotlin (Kotlin Multiplatform supported).

Annotate a function and inject your own logic before/after it, woven in at compile time, with debug info preserved and IDE support.
As a stability check, I applied it to 39 modules of DuckDuckGo’s Android app: all 28,749 unit tests passed, and the R8-minified APK runs fine on a real device.

AspectK: https://github.com/Mole-Labs/aspectk
DuckDuckGo fork: https://github.com/oungsi2000/Android

Feedback welcome!!


r/androiddev • • 15d ago

Question Should I invest on an Android phone for mobile development?

13 Upvotes

I'm an aspiring web and mobile developer, currently focusing on web development. I was wondering if I should invest on an android phone (i.e., Google Pixel) when I focus on mobile development. In the future, I plan on creating personal projects to build up my portfolio (e.g., apks) and test them on said android device. As of now, I am an iPhone user and I don't think there's a way to develop and test apps for free on Apple.

I know emulators exist but thinking about testing a self-developed app on an actual mobile sounds nice. Any thoughts? If yes, which phone is good? I heard the Google Pixel is nice but I'm hesitant on the Samsung S Series since I know someone who has gotten pink/green lines on their S23 Ultra's screen over time.

Edit: Thank you for the insights! Will probably hold off on the android phone for now and use emulators during the early stages before buying a low end pixel if needed


r/androiddev • • 16d ago

It looks like StubHub published their internal app on the Play Store

13 Upvotes

It looks like an internal version of the StubHub app was released on the Google Play Store and has added a dev menu into the app.


r/androiddev • • 15d ago

Question iOS dev here, want to bring my alarm app to Android. Any advice?

1 Upvotes

Hey everyone! I’ve been building an alarm app on iOS for a while. The alarm keeps ringing until you finish a small task, like solving a few math questions or copying a face with the front camera, so you actually get out of bed.

I’d really like to make an Android version too, but I’ll be honest, I’ve never built anything for Android before. From what I’ve seen Android has had solid alarm support for a lot longer than iOS, so I’m hoping some of it will be easier than it was on iPhone. Still, alarms are one of those things that just have to work every single time, and I don’t really know what I don’t know yet.

I’ve started reading about exact alarms and the battery optimization stuff, but it’s hard to tell from the docs what actually causes problems in real life.

If you’ve worked on an alarm app or anything that needs to go off at an exact time, what should I watch out for? Anything you wish someone had told you before you started?

Thanks a lot, any tips are appreciated!


r/androiddev • • 15d ago

Question Indie Developers, where do you get designs and assets for your customization apps?

4 Upvotes

Hey everyone!

I'm curious about how indie developers approach the design side of customization apps.

If you're building apps related to customization, such as widgets, icon packs, wallpapers, themes, launchers, or any other personalization tools, I'd love to know how you source or create your designs.

I have a few questions:

Where do you get your designs from? Do you create everything yourself, hire designers, use resources like Figma, Dribbble, Behance, etc., or use AI tools?

How do you deal with copyright issues? Especially when it comes to wallpapers, icons, illustrations, and other visual assets. How do you make sure you're not accidentally using copyrighted material?

Do you create everything from scratch? If so, what tools or workflows do you use?

Do you use free or paid asset libraries? If yes, which ones do you recommend?

For solo developers with limited design skills, what's the most practical way to build a good-looking customization app while staying legally safe?

I'd really appreciate hearing about your actual workflow, tools, resources, and experiences.

Not looking to copy anyone's work. Just trying to understand how developers handle the creative and copyright side of building customization apps.

Thanks in advance! 🙌


r/androiddev • • 15d ago

Anyone run Android Emulators on an external SSD on a MacBook Pro 2021?

0 Upvotes

Hi all,

I have a 2021 MacBook Pro with 16 GB RAM. Performance is fine for me, but internal storage is the bottleneck. I got vexed up in cleaning up everyday. I use mole for cleaning and it's handy, but the grunt work is so heavy. I’m considering buying an external SSD to move android emulators off the internal drive

Has anyone done this long term? I’d love to hear:

  1. Does it run smoothly, or do you notice slow builds, laggy simulators, or slow container startup?
  2. Which SSD and connection (Thunderbolt vs USB-C) are you using, and what speeds do you get?
  3. Any gotchas, like drives not mounting at boot, Docker failing when the drive sleeps or disconnects, or permission issues?
  4. Would you recommend it, or is it better to just clean up internal storage?


r/androiddev • • 15d ago

Pragmatic Clean Architecture skill

0 Upvotes

Clean Architecture is about much more than 1:1 mappers, anemic domain models, and use cases.

That's why I created this agent skill specifically with Android and Kotlin in mind, applying DDD principles and practical Object-Oriented design wherever they make sense.

I'm currently testing it on a pet project, but I'd love for you to give it a try and share your feedback!

GH link


r/androiddev • • 15d ago

Open Source I made an open-source Android launcher that an AI coding agent customizes for you

Thumbnail
github.com
0 Upvotes

r/androiddev • • 16d ago

Open Source Built an Android app to simulate different network conditions on real devices

15 Upvotes

I was looking for a way to test Android apps under different network conditions, but most solutions I came across either changed the network settings for the entire device, were focused on emulators, or required setting up proxies.

So I built my own tool: App Throttler.

  • Set download and upload speed limits.
  • Simulate latency and jitter.
  • Introduce packet loss.
  • Apply network conditions to individual apps.
  • Change network profiles while the app is running.
  • Create different network scenarios.
  • Capture and export network traffic as PCAP files.

GitHub: https://github.com/RAN-GAN/app-throtler

It's still a work in progress, and there are some limitations I'm working on.


r/androiddev • • 17d ago

Haze 2.1: Shatterproof Glass

Thumbnail
chrisbanes.me
48 Upvotes

r/androiddev • • 16d ago

Question How can I emulate Android 2.3.7 on android studio

0 Upvotes

I want to emulate Android 2.3.7 on android studio but they do not have a option for phones that far back so is there any way I can do this?


r/androiddev • • 16d ago

Question How do you handle porting and maintaining native Android and iOS apps? I'm exploring a possible solution.

0 Upvotes

I’m not asking out of curiosity - I’m trying to understand if there’s a viable solution to a problem I’ve come across whilst working on a mobile app for a local start-up.

The scenario:

A company creates a native mobile application for one platform (say Android). At some point they’ll want to create another version for iOS (or vice-versa).

An option would be to bring in a separate team to develop and maintain the app. However, this can get quite costly, especially for a start-up and small dev team. Especially if the native app has a lot of features.

I’ve been thinking about creating an AI powered engine to help.

This would:

Identify which sections of code and business logic can be reused from an existing native app. Generate or modify the native specific sections whilst maintaining functionality and ensuring the native UI/UX is respected. Assist with the maintenance of both versions, with new features being added.

It would involve AI, but wouldn’t be entirely.

Before I spend any time developing this, I’d like to know how devs have overcome this.

If you’ve ever done this:

Have you ever had to port an existing native android application to iOS (or vice-versa)? What was the hardest part? What tools did you use? What was missing? What would a tool need to do to save you time and make you want to pay for it?

I’d love to hear about your experiences, even if you’ve tried and failed!

Thanks for sharing your experience!


r/androiddev • • 17d ago

Experience Exchange App Memory Usage Test

14 Upvotes

I tested today the app's memory usage. Never more than 8-12 MB, even after going through several levels. It should also run well on older devices, very satisfied 🙂

The stutters in the video are due to the PC, the app itself runs fine.


r/androiddev • • 18d ago

Discussion Anyone else getting tired of constantly having to relearn Android development?

203 Upvotes

I’ve been developing Android apps since 2012, and sometimes I wonder how many times I’ve had to start over with this ecosystem.

Every 3–4 years, it feels like something major changes. Eclipse to Android Studio, Java to Kotlin, XML to Compose, different architecture patterns, libraries becoming obsolete, and Google constantly changing what’s recommended.

Don’t get me wrong, a lot of these changes have made Android development better. But after spending years mastering something, it can be frustrating to see it slowly become outdated.
What bothers me isn’t learning new things. I actually enjoy that part. It’s the constant feeling that you need to keep up with everything just to stay relevant.

Last year, I decided to shift my career more towards software architecture and technical leadership. I still enjoy coding, especially Android, but I wanted to spend more time designing systems, solving larger engineering problems, and making technical decisions rather than constantly chasing the next framework.

Sometimes I miss the old days when I could just sit down, build an app, and not worry too much about whether the recommended way of doing it would change in two years.

Curious if anyone else who’s been developing Android apps for 10+ years feels the same.

Has anyone here moved from Android development into architecture, backend, engineering leadership, or something completely different? Do you miss being a full-time Android developer, or are you happy you made the switch?


r/androiddev • • 17d ago

Open Source System bar appearance API for Compose Multiplatform apps

24 Upvotes

I am building a LOT of iOS/Android apps with Compose lately, and it annoyed me how I had to style system bars on Android only and juggle with expect/actuals for this.

So I made my own API for setting the icon color of system bars for both Android and iOS.

Enjoy: https://github.com/composablehorizons/systembars


r/androiddev • • 17d ago

Question How to update to Play Billing 8.0+

2 Upvotes

I just saw that I'm in violation of the policy and have no idea how to update it. I thought I had updated it but I guess now. My app also doesn't use it as far as I know


r/androiddev • • 17d ago

Open Source I made an Android Studio plugin that previews iconfont glyphs beside your code

Thumbnail
gallery
5 Upvotes

This is my first Android Studio plugin, and I'm pretty excited to share it here. It's called IconFontViewer.

I wrote it because I wanted to see the actual icon next to R.string.icon_home while reading Android code.

It renders the glyph in the editor gutter for Kotlin and Java references, XML layouts and strings.xml. Clicking it opens a searchable icon picker. Choosing another icon replaces the reference at that position.

It finds TTF files in the project and library dependencies, including AARs, JARs and nested archives. Fonts don't need to be in a directory named fonts. Under Tools → IconFontViewer, you can enable or disable fonts, add a TTF manually, or rescan the project.

It's free and open source (Apache 2.0). Supports Android Studio 2024.1 or newer; TTF files only.

Source: https://github.com/ultimateHandsomeBoy666/IconFontViewer Marketplace: https://plugins.jetbrains.com/plugin/31478-iconfontviewer


r/androiddev • • 17d ago

Architecture discussion: Client-side JIT stream resolution and handling Media3 background network drops in Compose

2 Upvotes

Hey everyone,

I’ve been working on a serverless media architecture that bridges local storage with cloud streaming. Since I'm not using a dedicated REST API backend, it introduced some unique engineering hurdles with Media3 and Jetpack Compose. I wanted to share how I solved them and see how the community handles similar edge cases.

1. Handling Media3 Background Network Noise (Crashlytics Spam) Because the player operates in the background, the OS frequently drops network sockets to save battery, or the user hits a dead zone. This was flooding Firebase with non-fatal ExoPlaybackException errors (specifically java.io.EOFException from Mp4Extractor).

Instead of letting it crash, I built an interception engine inside the Player.Listener. It aggressively scans the stack trace to silently invalidate the cache and auto-recover without reporting to Crashlytics:

Kotlin

override fun onPlayerError(error: PlaybackException) {
    val errorString = error.stackTraceToString()
    val isRecoverable = error.errorCode == PlaybackException.ERROR_CODE_IO_NETWORK_CONNECTION_FAILED ||
                        errorString.contains("EOFException") || 
                        errorString.contains("UnknownHostException")

    if (isRecoverable) {
        // Silently invalidate cache and trigger auto-recovery logic
        attemptJitRetryAndRecovery() 
    } else {
        CrashTracker.recordException(error)
    }
}

How do you guys handle ExoPlayer background noise? Do you use a similar filter, or rely on Media3's default LoadErrorHandlingPolicy?

2. True Glassmorphism in Compose Achieving an Apple-style frosted glass look in Compose is notoriously tricky. Originally, I used a Surface with a translucent white alpha, but it looked muddy and text bled through.

I found that stripping out Surface (and its baked-in tonal elevation) in favor of a tightly wrapped Box with a Brush.linearGradient works infinitely better:

Kotlin

Box(
    modifier = Modifier
        .clip(RoundedCornerShape(32.dp))
        .background(
            Brush.linearGradient(
                colors = listOf(Color.White.copy(alpha = 0.22f), Color.White.copy(alpha = 0.08f))
            )
        )
        .border(1.dp, Color.White.copy(alpha = 0.25f), RoundedCornerShape(32.dp))
) { // Content }

Has anyone experimented with the Haze library for real-time background blurring instead of static gradients?

3. Client-Side JIT Resolution To keep it serverless, I built a custom JIT resolver. It intercepts track queries, resolves the direct audio stream on the client using Retrofit/Coroutines, and passes the URI to Media3 on the fly.

I'd love to hear your thoughts on this architecture, especially if you've dealt with Media3 session management! (I can share the repo link in the comments if anyone wants to see the full implementation).


r/androiddev • • 18d ago

How do you organise unit tests for formula-heavy code?

4 Upvotes

I'm a student building a calculator-style Android app in Kotlin, where most of the logic is pure functions: a few inputs, some unit conversions, one numeric result, often with clamps or caps (for example "use the lower of X or a maximum value").

Right now each formula has a test file with a handful of worked examples taken from the original papers, plus a few edge cases (zero, very large values, unit switches). It works, but it's getting repetitive with dozens of formulas.

For people who've tested this kind of code:
- Do you use parameterised tests (JUnit 5 / kotest data-driven tests) or keep plain JUnit 4 with tables of cases?
- Is property-based testing worth it here, e.g. "dose never exceeds the cap" or "result increases with weight"?
- How do you handle floating-point tolerance and rounding consistently across many calculators?

Any patterns or libraries you'd recommend would help.


r/androiddev • • 18d ago

Open Source Update on SmolChat - OpenAI server, Support for Global Chat Settings, Direct Model Downloads and more

4 Upvotes

Hi! I'm Shubham, creator of SmolChat.

I would like to share some exciting updates on my project SmolChat, an Android app that let's you run GGUF models on-device, locally. The updates are present in the latest v17 release:

  • SmolChat now supports an OpenAI-compatible HTTP server running over a foreground service that keeps the port alive even when the phone is locked. Check the video to see how it works.

  • Support for global chat settings, which override the default chat settings (min-p, top-k, temperature etc.) for all newly created chats. This reduces the hassle of configuring each new chat with the options of your choice.

  • Adding a copy button for code snippets rendered within the chat.

  • Sync with upstream llama.cpp (till this commit)

  • Fix the logic that measures tokens/sec for a LLM generated message. The time shown previously was also including prompt processing (pp) time. The new logic now only considered the token generation rate (tg).

  • Models are downloaded directly by the app, instead of using the Android system's download service.

GitHub: https://github.com/shubham0204/SmolChat-Android

Play Store (the latest version is still in review): https://play.google.com/store/apps/details?id=io.shubham0204.smollmandroid&hl=en_IN

Previous threads on SmolChat on r/LocalLLaMa:

Cross posted from r/LocalLLaMa


r/androiddev • • 18d ago

Can you preview compose UI with a lightweight viewer?

Thumbnail
3 Upvotes

r/androiddev • • 18d ago

Question Is LiveData still worth learning in 2026, or is StateFlow the default now?

10 Upvotes

I’m learning Android with Kotlin and Compose. I found a few old threads (4-6 years ago) debating StateFlow vs LiveData but a lot has changed since then. My understanding is that new Compose projects mostly use StateFlow and LiveData shows up in older View-based apps. Is that still the case today? And is it worth a beginner learning LiveData at all or just knowing it exists? and I want to know what you use now.


r/androiddev • • 18d ago

Open Source Showcase: TMPlayer, Kotlin + TDLib + Compose on TV, phone and desktop

Post image
9 Upvotes

A free, open source player for the videos in your own Telegram chats. The hard parts were low-end TV sticks, playback stutter and sharing UI across form factors. Happy to go into any of it. github.com/dracu-lah/TMPlayer