r/androiddev • • Oct 18 '26

Discussion I'm training my own AI model for an offline document scanner — no more relying on pretrained TFLite models

0 Upvotes

Hey everyone!

I've been working on an Android document scanner, and I decided to take a different approach: instead of relying on existing pretrained TFLite models, I'm training my own model for document detection.

My current model is named "doc_edge_fp_32.tflite", and training is still ongoing.

Here's what I'm working toward:

- Custom AI model: Training on thousands of generated document samples mixed with real photographs.

- Dual predictions: Document segmentation masks and corner coordinates.

- Offline processing: The goal is to run document detection directly on Android without requiring a server.

- Accurate scanning: Reliable document boundaries, perspective correction, and better results on challenging backgrounds.

- Real-world performance: Generalizing beyond synthetic images to receipts, sheets of paper, and book pages.

I'm still training and evaluating the model, so I don't want to claim it's production-ready yet. My next priority is testing it on unseen real-world images and optimizing inference for mobile devices.

I'm curious about a few things:

  1. For document detection, would you recommend a shared backbone with separate segmentation and corner-regression heads?
  2. What techniques have worked best for bridging the gap between synthetic training data and real camera images?
  3. What metrics would you prioritize before deploying a model like this on Android?

I'd love to hear from people who have worked on computer vision, document scanning, segmentation, or on-device ML.

This is a learning project I'm putting serious effort into, and I'm excited to see how far I can take it!


r/androiddev • • Oct 18 '26

Discussion How much does AI affect your app revenue?

0 Upvotes

Since it's easier to make apps now with AI vibe coding, does it affect your revenue?


r/androiddev • • Oct 17 '26

Discussion Android edge cases to cover for sde 2

0 Upvotes

Hi everyone I am preparing for android interview recently with 3+ yrs of exp, I am good with topics of basic fundamentals

But struggle with topics involving scalability like

  1. let's us say you have an api that gets called 1 time per second, and your user is having low internet or unstable conditions how to handle this

2)how do you handle battery optimization for your app

After deep diving with Claude and discussion i understand the approach

So can you list down some practical questions like this you faced or would ask in a sde 2 interview

Thank You


r/androiddev • • Oct 16 '26

Tips and Information What to expect at Android Dev Summit 2026

8 Upvotes

Hi! This is my first time post so apologies if my questions aren’t clear!

But I’m an associate android dev. Been with the team for 1.5 years. I’m going to the Google dev summit in Oct and was wondering what should I expect based on previous years summit?

Also any advice when it comes to connecting with other android devs? I don’t need a job but I figure it good to network, connect with knowledgeable devs and even potential find a mentor when it comes to android development.

Also another question not really related to the summit:

I really do enjoy android development but work seems to only be about ticket speed/story points. Which I understand from the business side of things. But the push to utilize ai and rush story points just feels like there’s no care about developing younger devs. When I ask for help from sr devs, the first thing they ask me is “did you ask ai” or “ask ai first”. Before I even ask sr devs I make sure to research myself. I guess I thought dev teams would be more willing to actually show younger devs pointers that ai could sometimes miss.
Does anyone have any opinion or advice what that?
Or is it something I have to suck up and figure it out?


r/androiddev • • Oct 17 '26

Best Projects Courses or Projects that AI can help me understand

0 Upvotes

So I've been learning kotlin compose from the android official codelabs and I feel stuck like i want to make a big project so i can combine all the thinks that I've learned but i don't find a good idea or even a motive or someone so I can use a reference when I got stuck or dunno what to do next so I was asking is there like a course or projects on github that have dagger, retrofit, room and so on so i can learn from


r/androiddev • • Oct 16 '26

Settling on Dexprotector or Jiagu, please share your experience with...

1 Upvotes

We are still undecided but leaning Dexprotector, if you are using Dexprotector on your apps, please share your experience regarding:

1- Have you enabled all the runtime options such as root detection, RASP and UI protection? If yes, has it caused any headaches for a portion of your legitimate users?

2-Overall, has it met your expectations of warding off bad actors to a reasonable degree without it destroying UX?


r/androiddev • • Oct 15 '26

Experience Exchange Our app got cloned from a decompiled APK.

265 Upvotes

Last week, a user emailed support asking why our app suddenly had ads, which it doesn’t. Someone took our APK from the Play Store, decompiled it, added an ad SDK and put it on one of those APK mirror sites under a slightly different name. I don’t know what they used but with the AI reverse engineering tools around right now I’d guess it took them a few hrs at most.

I pulled their copy and ran jadx on it next to our own release build to see what they had to work with. R8 had renamed most of our classes but every string was still sitting there. Most of it was harmless like our Maps key which is locked to our package and the Firebase config which is meant to be public. The problem was the key for our search provider which can also write to the index. There was also an old basic auth header for a staging API that someone hardcoded two years ago and that still works.

The copy talks to our real backend and whoever installs it logs into our actual service through a build we don’t control. We’ve rotated both keys, moved search behind our own endpoint and filed takedowns. Next I’m looking at adding Play Integrity checks on the server.

If your app has been cloned like this, what did you end up changing on the backend?


r/androiddev • • Oct 16 '26

Article Running a full PostgreSQL 18 server inside an Android app: SELinux exec rules, argv[0] tricks and no shmget()

Thumbnail
dev.to
2 Upvotes

Author here. I'm building an Android IDE on my own and wanted a real Postgres running on the device, no remote server. The write-up covers the parts that took me longest: shipping the binaries as .so files so Android lets them execute, the argv[0]/symlink trick initdb needs, rebuilding without the Termux prefix, and forcing mmap because there's no System V shared memory. Happy to answer anything about it.


r/androiddev • • Oct 16 '26

Experience Exchange Convert an android phone into a story box for children

1 Upvotes

Hello, I am an embedded engineer which has no idea how to code an APK. I am usually programming in C/C++/python and I am dealing with rtos/interrupt/uart/spi...

With 2 kids at home and a lot's of story box (Lunii, Bookinou,...) I was tired of buying/uploading story into the differents toys.

I then decided to create an android APK (100% vibecoded) which can transform an old Android phone into a story box easy to use for the children.

I sent ADB to completely lock the phone that the kid cannot leave the app without entering a code.

Now I can just drop mp3 and/or image associated to have lot's of audio stories.

It is running so far so good but I have no clue if it is well programmed or just shit.

https://github.com/gougoul88/Aroli

I am opened to any reactions/opinions/suggestions.


r/androiddev • • Oct 17 '26

Do Android developers really need Android Studio for every Kotlin debugging task?

Post image
0 Upvotes

I was working on some Kotlin/JVM code and ran into a familiar situation.

Everything compiled fine, but the output wasn't what I expected. I just wanted to set a breakpoint, inspect a few variables, and find the issue.

Android Studio handles this well, but sometimes I'm just working on standalone Kotlin logic, utility classes, or JVM modules. Opening a full IDE for that felt unnecessary when I already had VS Code running.

So I started experimenting with Kotlin debugging in VS Code.

What I thought would be a small weekend experiment turned into a much bigger rabbit hole involving JVM bytecode, Kotlin inline functions, and source mapping.

Eventually, I built Kotlin Debugger, an open-source VS Code extension that lets me debug Kotlin/JVM code without setting up a separate Kotlin Language Server.

It's not a replacement for Android Studio, and Android device/emulator debugging isn't supported yet. But for Kotlin/JVM work, it's been an interesting project to build.

GitHub: https://marketplace.visualstudio.com/items?itemName=kparth01.kotlin-debugger

Curious how other Android developers work: Do you use VS Code for standalone Kotlin/JVM modules, or do you prefer keeping everything in Android Studio?


r/androiddev • • Oct 15 '26

Do android engineers earn less than other software engineers as we go up?

30 Upvotes

I have been an android engineer for almost 10 years now. In the beginning it felt like we made more or less the same amount of money as compared to other software engineers (backend specifically). But now as I have moved to a Staff eng role, it feels like senior/staff android engineers are being offered lot less these days compared to backend or infra or cloud storage related roles. Wonder if this is true or is it just in my head?


r/androiddev • • Oct 16 '26

Struggling with using webview for a html jscript file which reads local CSV files + saves local user data

0 Upvotes

Struggling with getting my head around webview.

I have an application which is a one page html javascript page however it needs to read csv files and make some kind of local storage to save the user's progress. What code would I need and where for an app like this as a minimum?

I've tried a few times, including using Gemini but I keep getting errors and things not working even when the syntax seems correct in android stuido.

I did the kotlin android material on the site to learn the basics but there seems to be a lot of other documentation to search through that makes my head spin, is this normal? I thought webview would be easier than creating it in kotlin originally but now I'm starting to feel like I should just scrap it and code it again. I am in science but not educated in computer science formally, any help is welcome.


r/androiddev • • Oct 15 '26

I built a native Markdown renderer for Jetpack Compose, now with tap-to-reveal text, LaTeX math and tree-sitter code highlighting

83 Upvotes

enriched-markdown-android is an open-source Markdown renderer for Jetpack Compose. Parsing is md4c over JNI, rendering is native Android text, so you get platform selection handles, copy and TalkBack for free.

What's new in 0.3.0:

  • Spoilers - ||text|| is drawn transparent and concealed by an animated particle overlay on the text view's canvas, tap to reveal. You can plug in your own overlay with a draw callback per concealed slice.
  • LaTeX math – $inline$ and $$block$$, wide equations scroll sideways, long-press to copy.
  • Syntax highlighting – fenced code colored by tree-sitter, 14 grammars, every token type themeable.
  • Better code blocks – language header, copy button, long lines scroll instead of wrapping.
  • Highlight – ==text== with `Flags(highlight = true)`.
  • Optional plugins – math and highlighting are separate artifacts, so you only add what you need.
  • Native Selection – Standard Android text selection handles and native copy behavior.

💎 Available on Maven Central:

dependencies {
  implementation("com.swmansion.enriched.markdown:compose:0.3.0")
  implementation("com.swmansion.enriched.markdown:math:0.3.0")           // optional
  implementation("com.swmansion.enriched.markdown:code-highlight:0.3.0") // optional
}

Quick Usage:

MarkdownPlugins(LatexMathPlugin, CodeHighlightPlugin) {
  EnrichedMarkdownText(
    markdown = content,
    flags = Flags(highlight = true),
    onLinkClick = { url -> openUrl(url) },
  )
}

GitHub & Docs:
https://github.com/software-mansion/enriched-markdown/blob/main/packages/enriched-markdown-android/README.md


r/androiddev • • Oct 16 '26

Open Source I got tired of my AI agent writing Compose UI it couldn't see, so I built a tool that renders @Preview to PNG without the IDE

Post image
0 Upvotes

I use Claude Code a lot for Compose work. The annoying part was always the same: it writes a screen, says "done", and then I open Android Studio and the padding is off, text is clipped, or the dark theme is broken. It never saw the UI. It was guessing.

So I built Spyglass. It renders your u/Preview functions to PNG from the command line, no IDE open.

spyglass render --filter LoginScreen

What it does:

  • Renders every u/Preview in a Compose Multiplatform project through your own Gradle wrapper. No changes to your build files.
  • Handles u/PreviewLightDark, u/PreviewParameter, font scale, device sizes, and multi-preview annotations from other modules.
  • Compares a render with a design image and tells you which regions differ, in dp, with a heatmap. So "make it match the Figma export" becomes something you can check.
  • spyglass approve / spyglass check gives you screenshot tests in CI. A one-digit text change fails the check.
  • Comes with an MCP server, so Claude Code, Cursor or anything that speaks MCP can render and look at the UI on its own and fix what it sees.

A few things I had to solve along the way that might be interesting:

  • Animations and delay() in fake data. A naive render catches the first frame, so you get a progress bar at 0% and a dialog half faded in. Spyglass runs previews on a virtual clock until everything settles, so a delay(300) before your fake data loads costs no real time and you see the loaded state.
  • A preview stuck in a loop used to hang the whole run. Now it gets cut off after 30 seconds and you get the exact line it was stuck on.
  • Token cost for agents. Images are sized down, and if nothing changed since the agent last looked, it doesn't send the image again. A repeat render went from about 1,560 tokens to about 180.

Limits, so nobody is surprised: previews need a JVM (desktop) target, so Android-only previews and Android-only APIs don't render yet. Text uses your OS fonts, so keep screenshot baselines from one OS. Tested on Windows, Linux and macOS.

It's MIT licensed and this is the first release (0.1.0). I'd really like to hear where it breaks on your projects.

https://github.com/zainkhalid91/spyglass


r/androiddev • • Oct 15 '26

Article Material is the metaphor: Pushing the limits of building with Material design cross platform with Jetpack Compose

Thumbnail
tunjid.com
14 Upvotes

I wrote a little design study for how I adapted Material design cross platform for my app with Jetpack Compose.


r/androiddev • • Oct 15 '26

Question Anyone letting agents drive their app on the emulator? Looking for feedback

13 Upvotes

I’ve been working on Argent, an open-source MCP server that lets your agent (Claude Code, Codex, Cursor, etc.) tap through your app on an Android emulator or device, read the view hierarchy and logcat, and profile with Perfetto. That way it can check its own changes instead of just saying it’s done

A lot of the feedback so far has come from React Native folks, but it works with native Kotlin/Compose apps too, and that’s where I’d love more input. If you’re already letting an agent test your app, what’s working and where it makes stupid mistakes?


r/androiddev • • Oct 15 '26

Can apps record GPS data in the background if the user approves?

2 Upvotes

I'm asking as a user of the Polar heart rate monitor app; I have no links to Polar. I use the app when hiking/biking and it records a map of where I went. However, I need to wear it in a wrist strap and make sure it's on top and the phone is awake. If the phone goes to sleep or another app is in front, their app will stop recording the location.

If users were willing to give their app a permission, could they fix this so it would keep recording GPS data even if another app is on top or if the phone has gone to sleep?


r/androiddev • • Oct 15 '26

News Android Studio Rabbit 2 Canary 5 now available

Thumbnail androidstudio.googleblog.com
2 Upvotes

r/androiddev • • Oct 15 '26

Developing for android in kotlin but the Android Studio is too much for my computer (seems like a common problem after some searches)

2 Upvotes

As the title says, my computer's specs make this run so slowly and I cannot open other programs at the same time. Are there any lighter applications that I can use to develop a native Android app which will also allow me to preview it in some way? (even if it is just when I press refresh, like with html)


r/androiddev • • Oct 15 '26

Building a wake-word voice assistant as an Android system service, fully on-device (v0.0.2)

Post image
3 Upvotes

I’m building a personal J.A.R.V.I.S.-style assistant that runs completely on my phone. It’s a system service rather than a regular app so it stays ready in the background.

Current state (v0.0.2): wake word, speech recognition, local LLM reply spoken back. The video shows real voice commands with no cuts.

Stack:

  • k2-fsa/sherpa-onnx for speech recognition
  • gemma3-1b-it-int4 for the language model

Next step is system configuration options. After that I want real actions like calls and timers.

Would love feedback from people who’ve done this. Mainly on keeping a service alive in the background without killing the battery and on picking a model that stays fast on mid-range phones.


r/androiddev • • Oct 15 '26

Open Source Reclaim the GBs Gradle, Android SDK images and Flutter builds leave on a Mac

1 Upvotes

I built Ammugghia after finding 100 GB of "System Data" on my MacBook Air: it was mostly iOS Simulator runtimes and Xcode/Gradle caches that Finder doesn't show.

  • Native SwiftUI, signed & notarized, no network, MIT
  • Covers Xcode, simulators, Android, about 30 package-manager caches, Electron app caches, local AI models, leftovers of deleted apps, Docker (volumes are never touched)
  • Every item shows exact paths and what happens after deleting it; Trash by default
  • Disk map, duplicate finder (APFS-clone aware), startup items, history with restore

DMG: https://github.com/Mingo07-dev/Ammugghia/releases/latest Homebrew: brew install --cask mingo07-dev/tap/ammugghia

Feedback welcome, especially cleanup targets I'm missing.


r/androiddev • • Oct 15 '26

Building a wake-word voice assistant as an Android system service, fully on-device (v0.0.2)

2 Upvotes

I’m building a personal J.A.R.V.I.S.-style assistant that runs completely on my phone. It’s a system service rather than a regular app so it stays ready in the background.

Current state (v0.0.2): wake word, speech recognition, local LLM reply spoken back. The video shows real voice commands with no cuts.

Stack:

  • k2-fsa/sherpa-onnx for speech recognition
  • gemma3-1b-it-int4 for the language model

Next step is system configuration options. After that I want real actions like calls and timers.

Would love feedback from people who’ve done this. Mainly on keeping a service alive in the background without killing the battery and on picking a model that stays fast on mid-range phones.


r/androiddev • • Oct 14 '26

Experience Exchange To senior android devs here, was it really that easy before the AI era?

38 Upvotes

These days, people often say that AI has severely impacted the job market. Candidates are applying to hundreds of jobs without getting a single interview call, and some are even losing their jobs to AI.

My question is for senior developers who have experienced the job market before the AI era: Was getting a job and landing interviews really easier back then, or are people overreacting and blaming AI for what might actually be a skills gap?


r/androiddev • • Oct 15 '26

I built a free scanner that checks apps and sites against the EU Accessibility Act (EAA) - feedback welcome

1 Upvotes

Android dev here. The EAA has been enforceable since June 2025 and consumer apps selling in the EU are in scope, but almost every accessibility tool I found was web-only or a €10k consultancy.

So I built my own: paste a URL, get an accessibility report with actual evidence (PDF export, violations mapped to WCAG criteria). Free, no signup.

There's also a Gradle plugin that runs accessibility checks in your own build (nothing leaves your machine), but that's optional - the web scan alone is useful.

Would love honest feedback, especially from anyone who's had to deal with EAA compliance for real. Link in comments.