DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to read a login code from a phone notification during a test with Droidline

Wait for a notification on the phone and use its text in your test flow.

Short answer: Run droidline serve and pair the phone with droidline pair; then Trigger the sign-in flow from your script so the code is sent to the phone; wait for the notification on the PC side and read the code from the app that received it. All steps.

Authorization notice. Droidline is dual-use. Only use it on software, sites and systems you own or have explicit permission to test.

Credentials. The one-time codes and login details the script handles are sensitive, so keep them out of logs and shared output.

Who it is forA QA engineer testing a sign-in that sends a one-time code by text message or notification.

The problemAutomated tests stall at a code sent to a phone, and the code is hard to pass into the app without manual steps.

The outcomeA test that waits for the code notification, reads the code from the app, and enters it in the login field.

What you need first

  • A PC running Windows, macOS, or Linux
  • An Android phone running Android 9 or later
  • The droidline archive for your system from the Releases page
  • droidline-agent.apk from the same release page, installed on the phone
  • Python 3.9+ or Node.js 18+ if you want to script, or an MCP-capable agent app

Steps

  1. Run droidline serve and pair the phone with droidline pair.
  2. Trigger the sign-in flow from your script so the code is sent to the phone.
  3. Wait for the notification on the PC side and read the code from the app that received it.
  4. Enter the code into the login field with input() and tap the confirm button.
  5. Verify the next screen loads by checking for an expected element.

Prompt for your agent

Using the Droidline repo at https://github.com/KnifeLemon/Droidline, write a Python test that starts the sign-in flow in <app package name>, waits for the notification that carries the one-time code, enters it into the field with id <code field id>, and checks that the element with text <expected text> appears. Report pass or fail and the code length, not the code itself.

Caveat. Android 15 and later hide one-time codes in notifications from apps, so the code may have to be read inside the app instead.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for KnifeLemon/Droidline and "Read a login code from a phone notification during a test"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer