Skip to main content
Glama

check_flutter_app_running

Check if a Flutter app is currently running in the foreground on an Android device. Use this tool to verify app state during development, testing, or debugging workflows.

Instructions

Check if a Flutter app is currently in foreground

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
device_serialNo

Implementation Reference

  • The handler function implementing the 'check_flutter_app_running' tool. It checks the current foreground activity for Flutter indicators and scans recent logcat output for Flutter logs. The @mcp.tool() decorator registers it as an MCP tool.
    @mcp.tool() def check_flutter_app_running(device_serial: str | None = None) -> dict: """Check if a Flutter app is currently in foreground""" activity = get_current_activity(device_serial) # Check if it's a Flutter activity is_flutter = False if activity.get('activity'): is_flutter = 'flutter' in activity['activity'].lower() # Also check for Flutter in logcat logs = run_adb(["shell", "logcat", "-d", "-t", "20", "-s", "flutter"], device_serial) has_recent_flutter_logs = len(logs.strip()) > 0 return { "current_activity": activity, "likely_flutter_app": is_flutter or has_recent_flutter_logs, "recent_flutter_logs": has_recent_flutter_logs }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rahulkr/r_adb_mcp_server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server