{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "knifelemon-droidline--collect-a-login-code-from-a-notification",
 "repo": "KnifeLemon/Droidline",
 "repo_url": "https://github.com/KnifeLemon/Droidline",
 "repo_slug": "knifelemon-droidline",
 "title": "Read a login code from a phone notification during a test",
 "page_title": "How to read a login code from a phone notification during a test with Droidline",
 "summary": "Wait for a notification on the phone and use its text in your test flow.",
 "who": "A QA engineer testing a sign-in that sends a one-time code by text message or notification.",
 "problem": "Automated tests stall at a code sent to a phone, and the code is hard to pass into the app without manual steps.",
 "outcome": "A test that waits for the code notification, reads the code from the app, and enters it in the login field.",
 "steps": [
  "Run `droidline serve` and pair the phone with `droidline pair`.",
  "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.",
  "Enter the code into the login field with input() and tap the confirm button.",
  "Verify the next screen loads by checking for an expected element."
 ],
 "agent_prompt": "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.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "1 hour",
 "basis": "readme",
 "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.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "go",
 "requirements": [
  "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"
 ],
 "risk": "dual-use",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "credentials",
   "notice": "The one-time codes and login details the script handles are sensitive, so keep them out of logs and shared output."
  }
 ],
 "best": false,
 "score": 0.7,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/knifelemon-droidline/collect-a-login-code-from-a-notification/",
 "md": "https://dedupedai.com/use-cases/knifelemon-droidline/collect-a-login-code-from-a-notification/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/knifelemon-droidline--collect-a-login-code-from-a-notification.json",
 "api_version": "v1"
}
