Skip to main content

mobium alert

This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET

Read a system dialog, or answer it

With no argument, prints what the dialog says, or that none is up.

A permission prompt is not part of the app: it is another process's window, and mobium current reports that process while one is on screen — com.google.android.permissioncontroller on Android, SpringBoard on iOS.

It is answered through the W3C alert endpoints rather than by tapping a button, so it works without knowing what the buttons say. A flow that taps "While using the app" works until the device is in Japanese, and this project pins apps to other languages on purpose.

These answer a dialog; they do not choose an outcome. On a permission prompt they do not mean grant and deny, and on iOS they are the other way round: measured on iOS 26.5, accept left the permission denied and dismiss left it granted, because W3C accept presses the affirmative button and Apple puts "Don't Allow" last. To choose an outcome, tap the button — mobium map returns them like any other element.

Usage​

mobium alert [accept|dismiss] [flags]

Flags​

FlagTypeDefaultWhat it does
--textstringtype into a prompt's field before answering

And the global flags.

Examples​

Ask whether a system dialog is up, and what it says​

mobium alert

Printed on an Android 15 emulator:

a dialog is on screen: "Discard changes?\nThey will be lost."

mobium alert on an Android 15 emulator

mobium alert on an Android 15 emulator

Answer it with the platform's accept button​

mobium alert accept

Printed on an Android 15 emulator:

accepted the dialog "Discard changes?\nThey will be lost." — this answered it and did not choose an outcome: on a permission prompt accept and dismiss do not mean grant and deny, and on iOS they are the other way round. Tap the button by ref if you need a particular answer
BeforeAfter
Before: mobium alert accept on an Android 15 emulatorAfter: mobium alert accept on an Android 15 emulator

mobium alert accept on an Android 15 emulator

More, from mobium alert --help​

mobium alert # is anything asking? what does it say?
mobium alert accept # grant the permission, or confirm the action
mobium alert dismiss
mobium alert accept --text "my draft" # fill a prompt, then confirm it

The tool​

alert calls app_alert; its arguments and what every client calls it are there.