Android apps with a coding agent
A coding agent can test your Android app’s sign-up the way a person would: build it, run it in the Android Emulator, fill the form with a Proxy Mail QA test address, then enter the code or open the link from the email. Proxy Mail QA gives the agent the address and the email’s code or link; the agent drives the emulator with its own tools, usually adb.
Every setup below starts with Proxy Mail QA connected to the agent: paste the one-prompt setup, or connect the MCP server by hand.
Claude Code, Codex or Cursor with adb
Section titled “Claude Code, Codex or Cursor with adb”Any agent that can run shell commands can drive the emulator through adb from the Android SDK’s platform tools. Start an emulator from Android Studio’s Device Manager (or emulator -avd with its name), open your project in the agent with Proxy Mail QA connected, and ask:
Build the debug app, install it on the running emulator and open it. Sign up with a new Proxy Mail QA test address, using the password it gives you, then enter the verification code from the email and check the app shows the account as verified. Take a screenshot at each step.
The agent then typically:
- Builds and installs with
./gradlew installDebug, and opens the app withadb shell am start. - Calls
create_addresswithpassword: true. - Finds the fields from
adb shell uiautomator dump(or a screenshot fromadb exec-out screencap -p), taps them withadb shell input tapand types withadb shell input text. - Submits, then calls
wait_for_codeorwait_for_link. - Types the code, or opens the link in the app with
adb shell am start -a android.intent.action.VIEW -dand the link, so your App Link or custom scheme handles it. - Takes a screenshot and checks the screen shows the account as verified.
adb shell input text needs spaces written as %s and some characters escaped, so ask the agent to check each field after typing, especially passwords.
Android Studio’s Gemini agent
Section titled “Android Studio’s Gemini agent”Android Studio’s agent mode can use remote MCP servers (Google’s guide). In Settings → Tools → AI → MCP Servers, select Enable MCP Servers and add:
{ "mcpServers": { "proxymail-qa": { "httpUrl": "https://api.proxymail.qa/mcp" } }}Choose Start Login to sign in through your browser. Android Studio doesn’t support MCP prompt templates, so ask in plain words rather than choosing a prompt such as test_signup_flow. We haven’t tested Android Studio’s agent ourselves yet; if its sign-in doesn’t complete, use Claude Code or Codex alongside Android Studio instead.
What else to ask for
Section titled “What else to ask for”- A dev server on your computer. The emulator reaches your computer at
10.0.2.2, so a dev build’s links to10.0.2.2:3000are expected. Ask the agent to mark it as a dev environment (mark_dev_host), andcheck_emailpasses those links instead of failing them. - App Links. After the link arrives,
check_emailwithexpect_hostset to your App Link domain checks the link goes there, andcount_emailscatches a second email sent by mistake. If the link opens Chrome instead of the app, the domain’sassetlinks.jsonor the app’s intent filter is the usual cause. - A code split into boxes. The agent taps the first box and types the whole code, then checks every digit landed before going on.
- A longer sign-up form. For a username with rules, a date of birth or a country,
form_valuesgives a value for each field from a new address made for it. - The same account next time. Ask the agent to record where the account is used (
environment, such asstaging, and tags such asandroid) when it creates it, solist_addressesfinds it again. With an API key allowed to read saved passwords,get_sign_inreturns the account and its password in one call. - A report. The agent calls
start_runfirst andfinish_runat the end, which returns the report in Markdown.
Offers and marketing emails
Section titled “Offers and marketing emails”- The coupon. After signing up for an offer in the app,
wait_for_codewithkind: couponreturns the coupon with its discount, end date and how long it took. The agent types it into the app’s promo field. - Checkout, with test payments only. Use Google Play’s license testers and test cards, or the app’s own test mode, never a real card or a real purchase. The agent records what the app did with
record_coupon_result. - A coupon as a link that opens the app, such as
myapp://redeem?code=…:wait_for_linkwithapp: truereturns it, and the agent opens it withadb shell am start -a android.intent.action.VIEW -dand the link. - One offer per person. Signing up again with a version of the same address (
get_address_variants), thencheck_offers, shows whether the app gave the offer twice. - Awkward names and passwords.
get_name_variantsandget_password_variantsgive values for the form’s other fields (apostrophes, accents, other scripts, each symbol class, the field’s limits); the agent types each in and reports what the app did. - Consent and unsubscribing. The agent records what it chose at sign-up with
record_consent, unsubscribes from the app’s settings or the email’s link, callsmark_unsubscribed, and latercheck_unsubscribelists any marketing that came after.
Writing it as a test instead
Section titled “Writing it as a test instead”To keep the check as a UI test that runs in CI, see Android (Espresso), or Maestro for a flow that also covers iOS.