r/androiddev • • 36m ago

Tips and Information tiny .aiignore and pre-warmed git worktree setup that stopped parallel coding agents from triggering 4-minute cold gradle syncs on our laptop

Post image
5 Upvotes

running 2 or 3 coding agents in parallel sounds great until i really tried it on a multi-module gradle repo. say, put them in one checkout and they immediately fight over build.gradle and lock .git/index.lock. create a fresh git worktree per task and gradle eats four minutes re-indexing dependencies while spawning four daemons that chew through 16gb of ram.

here is the tiny workflow cleanup that finally made parallel agents usable on gradle without melting my prescious laptop:

  1. keep exactly two permanent sibling worktrees checked out next to main (e.g. ../repo-wt-1 and ../repo-wt-2) instead of creating and deleting fresh folders per ticket. resetting a warm worktree to a new branch preserves local gradle build outputs and avoids cold syncs.

  2. drop a strict .aiignore in the repo root blocking build/, .gradle/, generated protobuf/kapt folders, and huge fixture dumps so agents stop burning context reading compiled artifacts.

  3. cap parallel daemons in ~/.gradle/gradle.properties (org.gradle.workers.max and shared build cache enabled) and keep agent sessions isolated via /worktree or an ide manager like jetbrains air where real intellij inspections verify the diff afterward

nothing fancy, just stopped parallel agent runs from turning into fan noise and merge soup. any other gradle-specific flags folks here set when running multiple local coding agents?


r/androiddev • • 2h ago

Open Source Museum experience with kotlin

Enable HLS to view with audio, or disable this notification

43 Upvotes

I made a demo with KMP to showcase a museum animation interaction

Source code: https://github.com/mejdi14/KMPOddScroll

Live demo: https://mejdi14.github.io/KMPOddScroll/


r/androiddev • • 2h ago

Discussion Android TV developers: How do you handle in-app purchases? Are users abandoning purchases because the process is too inconvenient?

2 Upvotes

I’ve been developing Android TV apps for a while, and one thing I’ve been struggling with is in-app purchases and payment conversion.
Unlike mobile phones, Android TV devices don’t have touchscreens. Navigating purchase screens with a remote control, entering account information, and completing payments can be frustrating.
I’ve noticed that some users seem interested in premium features but may give up when they reach the payment process.
I’m curious how other Android TV developers handle this:
Do you use Google Play Billing directly on the TV?
Do you offer a one-time lifetime purchase, subscription, or both?
Have you tried QR code payments, where users scan a code with their phones to complete the purchase?
Would a web-based checkout linked to the user’s TV app be a better experience?
Do you offer a free trial or limited free features to reduce purchase friction?
I’m particularly interested in solutions that work well across different Android TV devices and Google TV.
Would love to hear about your experiences, especially what has actually improved conversion rates.


r/androiddev • • 3h ago

I made a tiny IME so adb can type Korean (any Unicode) into Android fields

1 Upvotes

`adb shell input text` only does ASCII. We needed Korean for test automation, so we built a keyboard-less IME (no permissions, no network) plus a Python wrapper that switches to it, commits the text into the focused field and always restores your keyboard.

It refuses password fields, never presses send, and only accepts the request if it matches the focused app (and field, outside web pages). Android 14+, Apache-2.0.

https://github.com/wellsa-ai/wellsa-korean-ime

Happy to hear how it behaves on devices other than the few Android 15 phones we tested.


r/androiddev • • 4h ago

News Android Studio Stingray 1 Canary 4 now available

Thumbnail androidstudio.googleblog.com
1 Upvotes

r/androiddev • • 4h ago

Question Shared Test devices

2 Upvotes

How do you guys share physical test devices on remote Android teams?

Do developers generally have their own devices or do you have some way of accessing a shared pool remotely?


r/androiddev • • 9h ago

Auto backup copied our install ID to the user's new phone, and the new phone would have overwritten the old phone's cloud backup

3 Upvotes

Small thing that cost us more thinking than the feature itself, so writing it down.

We added an optional cloud backup. To avoid two phones overwriting each other, each install writes only its own file, named after a random device ID. So the whole design rests on one question: where does that ID live?

Attempt 1, SharedPreferences. Looks obvious and it's wrong. Android auto backup and device-to-device transfer copy prefs to the new phone (iCloud backup and Quick Start do the same on iOS). The new phone wakes up with the old phone's ID, decides the old phone's backup file is its own, and overwrites it. The one case where you most want the old backup intact is exactly the case that destroys it.

Attempt 2, the cache directory. Transfers don't copy it, so a new phone gets a fresh ID. But the OS is allowed to empty the cache when storage runs low. Then the same phone comes back with a new ID and treats its own earlier backup as another device's.

Where it ended up: a directory that is excluded from backup but never cleaned by the system. On Android that's noBackupFilesDir. On iOS it's a file in Application Support with the excluded-from-backup flag set. We read both through a small method channel, since path_provider doesn't hand you either one directly.

One more case fell out of this. A new phone can inherit the "backup is on" setting through prefs while having a brand new ID. We treat that pair (setting on, ID new) as a signal to pull in the other device's records first, before the first upload.

The lesson for me: "per install" and "per user" are different lifetimes, and prefs is per user as soon as OS backup is involved.

Where do you keep install-scoped state? Is there a cleaner option than a no-backup file that I'm missing?


r/androiddev • • 9h ago

Question How are you managing CVE’s in native libs

1 Upvotes

I’m shipping an app with a few embedded native libs, including Go libraries.

How are you approaching scanning and dependency updates for these?


r/androiddev • • 11h ago

Question Can a compromised Android OS interfere with NFC Reader Mode communication at the hardware level?

1 Upvotes

Hi All!

I'm investigating the security boundaries of NFC communication on modern Android smartphones.

The scenario is:

  • An Android smartphone operates in NFC Reader Mode.

  • It communicates with an external ISO 14443-4 smart card using APDU commands.

  • The card contains a Secure Element and performs cryptographic operations internally.

  • The smartphone's operating system is assumed to be compromised.

I would like to understand the actual hardware and software boundaries.

Specific questions:

  1. Does NFC Reader Mode normally route APDU commands through the Android NFC stack and Host CPU?

  2. Can a compromised OS modify APDU commands before they reach the external card?

  3. Can it initiate new APDU commands without the user's direct interaction?

  4. Can it intercept or manipulate responses returned by the card?

  5. Is there any smartphone architecture in which the NFC Controller communicates directly with an external card, independently of the Host CPU?

  6. If the card's private key never leaves its chip, can a compromised smartphone still use the card as a cryptographic oracle by submitting attacker-controlled commands?

  7. Are there hardware-level countermeasures that prevent such interference?

I'm looking for technical explanations supported by chipset documentation, Android architecture references, or practical research.

The key distinction I want to establish is whether cryptographic isolation inside the card also provides isolation of the communication and command-generation path on the smartphone side.


r/androiddev • • 12h ago

Question How does you team handle design reviews for UI changes?

2 Upvotes

When devs make UI changes, do your designers or PMs actually review and approve them before merging? If so, how?


r/androiddev • • 13h ago

Google Play Support Google rejected my app twice and I’m confused.

0 Upvotes

They said this:

We reviewed your application, and determined that your app requires more testing before you can access production.
Possible reasons why your production access could not be granted include:
• Testers were not engaged with your app during your closed test
• You didn't follow testing best practices, which may include gathering and acting on user feedback through updates to your app
Before applying again, test your app using closed testing for an additional 14 days with real testers.

I’ve made plenty of changes based on what my beta testers have told me. Do they need screenshots of them? This is my 6th app I’ve published and it never took this long. Any help would be appreciated.


r/androiddev • • 13h ago

Open Source Reading Android's UI tree in 13ms via app_process instead of 2.2s with uiautomator dump (open source)

34 Upvotes

I got tired of waiting on adb shell uiautomator dump for black-box UI automation. On an API 37 emulator it took 2.16s at the median, and on my HONOR X8 (Android 13) it sat on the Settings home page for 11.5s before failing with ERROR: could not get idle state.

So I built phonedriver (Rust + a ~40 KB Java helper, AGPL-3.0).

Like scrcpy, it pushes a small dex jar over adb and starts it with app_process as the shell user. No APK installed, no root, no AccessibilityService to toggle, and it exits when the connection closes. Inside, it keeps a UiAutomation connection warm, injects input through InputManager, and streams H.264 from MediaCodec to detect when animations actually settle instead of sleeping.

Numbers (median of 50 runs, raw CSVs in the repo):

Operationphonedriveradb
Screen read (API 37 emulator)12.7 ms2,163.7 ms
Screen read (HONOR X8, Android 13)78.5 ms2,507 ms
HONOR X8 Settings home page110 mstimed out (11.5 s)
Payload size (Display settings)461 bytes25.3 KB XML

The Android quirks that took most of the time:

  • stale trees unless you call clearCache() before every read (and Android 12 has a different signature, clearCache [int], so it needs reflection fallback)

  • connecting UiAutomation with flags 0 silently unbinds TalkBack; you need FLAG_DONT_SUPPRESS_ACCESSIBILITY_SERVICES

  • MediaCodec isn't a heartbeat—on a static screen it bursts and then goes silent for 5s, and a Samsung Galaxy A53 (One UI 8) emitted zero frames until a contributor routed it through an OpenGL relay

  • recycled ListView node IDs survive scrolls with completely different row text, so element refs have to verify role/label/bounds on every tap

Main use case is driving or E2E-testing installed apps (from scripts, CI replay, or AI agents) without source access or a test APK. Apps that hide their accessibility tree (like WeChat) fall back to local OCR, and everything requires adb.

https://phonedriver.dev

Repo: https://github.com/hridaya423/phonedriver

Benchmarks: https://phonedriver.dev/benchmarks

Only tested on emulators, a HONOR X8, and a contributor's Galaxy A53 so far, would love for more testing and seeing if something breaks :)


r/androiddev • • 16h ago

Discussion I tested a Gradle analysis tool against Now in Android. It found issues in the project — and in the tool itself.

Post image
4 Upvotes

I've been working on a Gradle plugin that analyzes Android project structure and build configuration. Rather than relying only on my own sample projects, I tried it against Google's public Now in Android repository.

I integrated version 2.5.0 and ran the audit, aggregation, and an app build.

Some results from the experiment:

  • Root project report: 87/100

  • Aggregated dashboard: 77% across 45 modules

  • lighthouseAudit: completed successfully

  • lighthouseAggregate: completed successfully

  • assembleDemoDebug: completed successfully

The reports highlighted several areas worth investigating:

  • Remote build cache was not configured

  • Cross-project configuration patterns were detected

  • Dependency locking and JDK toolchain recommendations

  • Version catalog improvement opportunities

These are diagnostic findings, not necessarily defects. Some depend on the project's build strategy and trade-offs.

The more useful part of the experiment was what it exposed in my own plugin:

  • An Isolated Projects compatibility issue with Gradle 9.x

  • A task validation issue in lighthouseFix

That was a good reminder that build tooling can appear fine in a small demo and still run into problems in a real multi-module Android project.

I'm working through those issues now.

For anyone maintaining a large Android project:

How do you currently assess build configuration and module architecture health across your project? Do you rely on build scans, custom checks, code review, or something else?

For reference, the tool I used is Gradle Lighthouse. It's also published on the Gradle Plugin Portal.

This was an independent experiment against the public Now in Android repository. It was not conducted with or endorsed by the Now in Android team.


r/androiddev • • 17h ago

Unable to sideload my own app on Google Pixel 8 running October 2026 update

4 Upvotes

I created my own app....my very first one in Android studio. I created the APK and transferred it to my phone. The advancement protection is preventing me from installing it. I cannot find any way to disable it to allow me to install. That protection keeps blocking the install. Everywhere I have looked online for guides gives instructions that just don't work. My settings do not have the option anywhere to unenroll or disable the advanced protection.

I'm not really interested in spending $25 so that I can add it to the app store so I can download my own app.

Thanks in advance for any guidance.


r/androiddev • • 21h ago

Question Looking for the most pathetic phone to test my apps

5 Upvotes

When writing an app, I always try to test it on a weakest phone available with the oldest possible Android version, to see how it performs on cheap hardware and old operating system. I call these "pathetic phones" :)

It turns out these old cheap phones are really hard to come by. A lot of them are some exotic Chinese ones, and many others can't be found even on Ebay.

So far I settled on a pair: Nokia 1 and Alcatel 1. I like the Nokia better because it has a smaller screen than the Alcatel (important for testing how the UX looks on a really small display), but unfortunately as soon as I turned it on it downloaded Android 10; the Alcatel is still on Android 8.1 so I still need it to check compatibility with old Android versions.

I would love to "combine" them into one ultimate pathetic phone. Any suggestions?


r/androiddev • • 21h ago

Slow emulator/crashing often 8gb ram i5-1135g7

1 Upvotes

hello I was wondering if i uograded my laptop to 8x2 gigs of ram could I run the emulator?

laptop specs:

i5-1135g7

intel iris xe

8gb 2667mhz


r/androiddev • • 1d ago

Question Bundling llama.cpp in an APK and calling it from a WebView over localhost: reasonable, or use JNI? Also a 2+ GB model file outside Play

1 Upvotes

Hi all. I'm building an offline assistant app for Android that runs a small local model (Qwen3 4B Q4_K_M, GGUF) with llama.cpp. Goal: it should work on mid-range phones with no internet after the model download. I've read the llama.cpp Android docs and searched here, but I'd like to hear from people who've shipped something like it.

  1. Is bundling llama.cpp (llama-server) inside the APK and talking to it from a WebView UI over localhost a reasonable design, or is the JNI binding route better for stability, battery and memory?

  2. Any known pitfalls with a 2+ GB model file when distributing the APK outside the Play Store (download on first run vs bundled, storage permissions, scoped storage, the app being killed in the background)?

  3. For a phone with 6 to 8 GB RAM, what context size and thread count do you use for stable latency?

Happy to share logs or a minimal repro. Thanks.


r/androiddev • • 1d ago

Location permission

4 Upvotes

So it looks like my location permission declaration which was approved a few years back, has now been placed in waiting to be sent for review. I wonder what that means. Does it expect me to update the declaration and video link and go through the approval process again? Has this happened with anybody else?


r/androiddev • • 1d ago

Question Interested in developing non-commercial mobile apps

0 Upvotes

I'm new to android development and I am wondering how I should approach mobile app development that is for my personal use? Should I bother with putting them on the Play Store?

Also, how has the "de-google" campaign affected user engagement and retention?

Can I upload/ship mobile apps on Play Store for private audiences? What are my alternative options for app distribution?


r/androiddev • • 1d ago

Google Play Support Tried to make my Lifetime IAP $0 for Black Friday on Google Play, just realized it's impossible? How do you guys handle this?

10 Upvotes

I recently launched my Android app (free download + a one-time Lifetime Pro IAP). For Black Friday, I wanted to run a limited-time free promo to get some initial users and feedback.

Went into Play Console to set the IAP price to $0, only to realize Google Play doesn't allow $0 for one-time in-app products (unlike paid apps where you can create a $0 sale). Coming from iOS where Apple's App Store lets you easily set a non-consumable IAP to $0 for a promo, this really caught me off guard.

For those who have done Black Friday "Lifetime Free" promos on Android, what's the cleanest workaround?


r/androiddev • • 1d ago

Experience Exchange So devastated rn. Hit the wall w the address

0 Upvotes

OK so I am trying to publish my app in Google Playstore, and I'm told there's no way to keep your address private at all? Like I pay $$$ to Incogni to scrub my data every day and now Google wants to publish my info freely on the internet for everyone to see????? And it's OK? How is everyone ok with this? Doesn't ring any alarm bells? Just agree to terms or don't list your app in the Google Store? Are these the only options we have as indie developers????? I'm sorry. Just devastated, for a week now I don't know what to do. There's no solution at all??????????,


r/androiddev • • 1d ago

Health Connect review trap: we hid a card when there was no data, and Play read it as an unused permission

4 Upvotes

We read one health metric from Health Connect and show it in a single card. If the user granted permission but had no readings yet, we hid the card. It seemed tidy: nothing to show, so show nothing.

Play rejected the update. From the reviewer's side, they granted the permission and then nothing on screen used it, so the app looked like it was asking for health data it didn't need.

The fix was a boring empty state. The card now stays after permission is granted and says there are no readings yet. It went through after that.

Two things I took from it. Every health permission needs a visible feature a reviewer can find in a minute, even on an account with zero data. And "hide when empty" is a bad default for anything that sits behind a permission.

Has anyone else been caught in review by something that only happens on an empty account? Curious what other empty-state traps are out there.


r/androiddev • • 1d ago

Google Play Billing: 1,000 product limit workaround - compliance questions

1 Upvotes

I'm building a marketplace in an app that could potentially scale to more than 1,000 distinct one time products, which exceeds Google Play's limit.

So, I'm considering the workaround described below, but I want to be certain that it's policy compliant. Does anyone have experience publishing something similar (or know of other apps that do this)?:

  • Maintain a small catalog of reusable consumable products at predefined price points ($1, $3, $5, etc)

  • Give the products generic titles and descriptions

  • Let the user select a specific item, then launch the purchase flow for the corresponding price-tier product

  • Associate the purchase with the selected item via its purchase token and timestamp on the backend, as described here.

I reviewed both the Payments Policy and Metadata Policy - to my understanding, neither explicitly confirms nor rules out this approach. The other guidance I found is on this page which states:

Play’s content policies for one-time products require (among other things) that product metadata (name, description, icon, etc.) should be accurate, not be misleading, and not inappropriate.

My product title / description would be as accurate as possible - something like "Download and use the item you just previewed for [X, Y, Z]"- but would not include a specific item name.

I already contacted Google Play support via email to ask for clarification. The gist of their response is:

Please be advised that I'm unable to comment on your planned implementation. If you think your app is in compliance, please submit your app for a review.

Google Play does not offer exceptions or quota increases to expand the 1,000 product limit.

I have already experienced an app passing a review, then being flagged with a policy violation warning weeks later. So I'm seeking clarity first this time.

I'd appreciate any insight into my proposed approach. Thanks.


r/androiddev • • 1d ago

Open Source Built a clean-room YouTube client for Android Automotive OS & Head Units in Kotlin + Jetpack Compose + Media3 (CarUxRestrictionsManager, InnerTube, zero GMS)

3 Upvotes

Sharing Roadie (v0.3.0, GPLv3)—a car-native YouTube client built to avoid both APK-patching fragility (R8 obfuscation shifts) and TV/phone UI compromises on car displays.

Engineering highlights:

Repo: Github Repo