# Microdosing AI for Mobile Dev

I’ve been experimenting with small, practical ways AI can fit into my daily mobile development. Not to write code for me, but to accelerate the “in-between” steps of my workflow. These little uses aren’t super flashy. They just smooth out some pain points.

<div data-node-type="callout">
<div data-node-type="callout-emoji">✨</div>
<div data-node-type="callout-text">Here’s some examples using <a target="_self" rel="noopener noreferrer nofollow" href="https://developer.android.com/gemini-in-android?gclsrc=aw.ds&amp;gad_source=1&amp;gad_campaignid=22525788956&amp;gbraid=0AAAAAC-IOZl4l9s5BWyqCTTGWNgwTnbvu&amp;gclid=CjwKCAjwjffHBhBuEiwAKMb8pNSXifdA-U1SBZOBoiyVvfJtfniUQBukCvb427rvhRGqeasv6LuAkxoC22oQAvD_BwE" style="pointer-events: none">Gemini in Android Studio</a> with the <a target="_self" rel="noopener noreferrer nofollow" href="https://github.com/android/compose-samples/tree/main/Jetchat" style="pointer-events: none">Jetchat</a> project, but any AI Agent you have access to should work!</div>
</div>

---

## Reverse Lookup a Screen

You’re debugging a UI, see some text, and have no idea where it’s coming from. You start in `strings.xml`, follow the ID through the ViewModel, check the Composable, maybe even [grep](https://en.wikipedia.org/wiki/Grep) the whole project. It’s the least interesting scavenger hunt in Android development, but an extremely common pattern to reverse lookup the UI that’s being rendered.

Now I just drop a screenshot into an AI Agent and ask where that text lives. It’ll usually tell me the string resource name, where it’s referenced, and which file renders it. It’s the kind of task that’s perfect to hand off. Something that used to take a few minutes and some effort is now no concern.

**Example Prompt**

<div data-node-type="callout">
<div data-node-type="callout-emoji">🤖</div>
<div data-node-type="callout-text">Given this screenshot of my app, show me where this is defined and where I can make edits to this UI.</div>
</div>

%[https://youtu.be/tiP1tnTSPyQ] 

---

## First Pass Review

I still rely on teammates for real code review, but AI’s great for a quick first pass. Before I open a PR, I’ll paste the diff or ask an agent to look at my commit history. Then I ask for feedback on readability, potential issues, and edge cases.

### Time Saved!

I work in a [large project](https://www.reddit.com/r/androiddev/comments/1ksptx7/comment/mtonvgx/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button) and we generally can’t sync all of our modules at once. Doing this first pass of review has saved me time where I missed updating an override when adding a new function to an interface whether its in a fake in tests or an implementation in another module. Typically CI/CD would catch this for me, but that takes much longer to run.

**Example Prompt**

<div data-node-type="callout">
<div data-node-type="callout-emoji">🤖</div>
<div data-node-type="callout-text">Here’s a PR diff. Review this code change in a kind but critical way. Highlight anything that looks error prone, consider edge cases, evaluate general performance. Favor readability. Summarize into actionable bullet points with must fixes and suggestions.</div>
</div>

---

## Unused Resource Cleanup

All projects collect junk over time. You’ll find string resources that aren’t referenced, drawables from redesigns, or xml layouts replaced by Compose. They all sit there bloating the project and slowing builds.

AI Agents are pretty good at walking the reference graph across modules and telling you what’s safe to delete.

This is especially helpful for large projects where not all modules are synced or the Unused Resource tool simply falls over.

[![One reddit user says "That shit simply does not work in big projects" in a thread about using the Android Studio unused resources tool.](https://cdn.hashnode.com/res/hashnode/image/upload/v1761504713263/a7700346-9128-48fe-9838-77cf370ff960.png align="center")](https://www.reddit.com/r/androiddev/comments/1ksptx7/comment/mtonvgx/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button)

**Example Prompt**

<div data-node-type="callout">
<div data-node-type="callout-emoji">🤖</div>
<div data-node-type="callout-text">Given this resource, does it have any uses? If not can you remove it?</div>
</div>

%[https://youtu.be/L-Je5tjJqig] 

---

## Supercharging Find in Files

We all love the **Find in Files** feature (`Cmd+Shift+F`), but plain text search can often show way too much noise. There’s a little "regex" checkbox that unlocks a lot of potential! Although writing regex is [usually](https://regexle.com/) not fun. This is a task I’m happy to hand off.

Describe the code to find in plain English and let the AI generate the complex pattern for the search box.

### **Example 1: Hunting Hardcoded Strings**

You're trying to stamp out hardcoded strings in your Jetpack Compose code. A simple search for `Text("` is a noisy mess that misses half the cases and incorrectly flags others. Now, I just ask for a smart regex that finds `Text("Hello")` and `Text(text = "World")` but correctly *ignores* `Text(stringResource(R.string.hello))`.

**Example Prompt**

<div data-node-type="callout">
<div data-node-type="callout-emoji">🤖</div>
<div data-node-type="callout-text">Give me a regex for IntelliJ's search to find all Jetpack Compose <code>Text()</code> calls where the <code>text</code> parameter is a hardcoded string literal, not a <code>stringResource()</code> call.</div>
</div>

%[https://youtu.be/rP1B_o9beH8] 

### Example 2: Auditing Theme Colors

You're migrating to Material 3 and need to find every layout that’s still using a hardcoded color (like [`#A4C639`](https://www.colorhexa.com/a4c639)) instead of a theme attribute (`?attr/colorPrimary`). Instead of manually scanning hundreds of XML files, I can get a single regex to find every violation.

**Example Prompt**

<div data-node-type="callout">
<div data-node-type="callout-emoji">🤖</div>
<div data-node-type="callout-text">I'm searching my <code>.xml</code> layout files. Write a regex to find any XML attribute that ends in <code>Color</code> (like <code>android:textColor</code>) and is set to a hardcoded hex value that starts with <code>#</code>.</div>
</div>

---

If you’ve found other ways AI boosts your mobile workflow, I’d love to hear about them!

Thanks for reading 💚
