Skip to main content

Current

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

Report the app currently in the foreground, as a package name or bundle id. These call app_current.

Current​

func (d *Device) Current(ctx context.Context) (string, error)

Current reports the package name or bundle id of the foreground app.

It costs no extra device call: it reads the hierarchy a snapshot fetches anyway. Use it to confirm a tap went where you expected.

Examples​

Ask which app is in front​

app, err := dev.Current(ctx)
if err != nil {
return err
}
fmt.Println("in front:", app)

The same call from the command line, mobium current, printed on an Android 15 emulator:

com.android.settings