phone_launch_app · wangzan101, tools — Claude Code prompt: what it does, how to install
phone_launch_app — a prompt for Claude Code and ChatGPT launches an app on the phone virtual display by package name and waits for foreground focus. Handles app clones, cold restarts, and occupied task locks.
Apache-2.0 ★ 9,488 updated 2026-11-16
.claude/commands/phone_launch_app.mdWhat phone_launch_app does
The prompt launches an installed application on the phone virtual display using its exact package name and confirms it reached the foreground. Setting cold=true restarts the app from its initial view. Running a cloned or work-profile copy requires the user identifier from the phone_list_apps output, while the primary app omits it.
Execution logic covers system dialogs and read failures. When the app fails to appear, the call returns ok:false detailing what occupies the screen. If window contents cannot be inspected or Android displays an app clone chooser, the prompt stops further launch retries.
If another task holds the application, the run yields app_in_use_by_other_task. Repeating the call with wait in seconds queues the launch until the active task releases the app.
What it helps with
- open an app on the phone virtual display by package name
- launch a cloned application using the
userID - restart an app from the initial screen with
cold=true - wait out task locks when receiving
app_in_use_by_other_task
Example prompts for the agent
- Launch
com.example.appon the phone display and wait until it is in the foreground - Restart
com.example.appfrom its initial screen withcold=true - Open the work profile copy using the
userparameter fromphone_list_apps
How to install phone_launch_app
Manually: put the files in place
.claude/commands/phone_launch_app.mdHow to use
Paste the text at the start of a chat or into project instructions
Questions about phone_launch_app
How to install phone_launch_app in Claude Code?
Save the prompt file to .claude/commands/phone_launch_app.md.
What does phone_launch_app do?
It opens an app on the phone virtual display by package name, waits for foreground visibility, and manages clone selectors.
How to handle an app occupied by another task?
Run the command again with the wait parameter in seconds. It launches the application as soon as the competing task releases it.
Source text
phone_launch_app.md · Apache-2.0
Open an installed app on the phone's virtual display by exact package name, and wait until it is in the foreground. To open another copy of the app (a clone or work-profile copy), also pass user from that copy's phone_list_apps entry; leave it out for the main app. Set cold=true to restart it from its initial screen. If the app does not reach the foreground, it returns ok:false with what is there instead; if it is in the foreground but its window cannot be read, the result says so: do not launch it again. If the system asks which one to open (an app installed twice, as main and clone), it returns ok:true with chooser: tap the option the user meant, otherwise the main one, and do not launch again. If another task is using the app, it returns app_in_use_by_other_task; to wait for it instead of doing something else, call again with wait (seconds): it opens the app as soon as the other task lets go.
© wangzan101 · Apache-2.0 · wangzan101/Mika
Similar prompts
All prompts for Mobile →phone_launch_app by other authors comes first.