Skip to main content
Momentic supports local and remote Android emulators. Real devices are not supported. Local emulators use your Android Studio install; remote emulators run from any host.
Using an AI coding tool? Copy the following prompt to set up the Momentic skills and MCP server so agents can author and run mobile tests directly from your editor.

Set up the Momentic mobile CLI, skills, and MCP server for an Android project.

CursorOpen in Cursor

1. Prerequisites

  • Node.js 20.19.0+, 22.12.0+, or 24.0.0+
  • Java JDK 24 (or later)
  • Android Studio with platform tools and emulator components
  • An APK of your app (see App setup)
  • A Momentic account, sign up to generate an API key
node -v          # v20.19.0 or higher
java --version   # JDK 24
echo $ANDROID_HOME
See App setup for a full walkthrough of installing Java, Android Studio, and setting ANDROID_HOME.

2. Install

npm install --save-dev momentic-mobile@latest

3. Authenticate

Create an API key in the dashboard, then export it:
export MOMENTIC_API_KEY=your-api-key-here

4. Initialize

npx momentic-mobile init

5. Install browsers

Momentic uses a headless browser to automate Android WebViews:
npx momentic-mobile install-browsers chromium
If your app renders content inside an Android WebView, enable WebView debugging so Momentic can attach: WebView.setWebContentsDebuggingEnabled(true). See Android app setup for details.

6. Upload your APK (remote emulators)

Remote emulators are the fastest way to get started, no Android Studio VM required. Upload your APK to a channel:
npx momentic-mobile assets upload ./path/to/app.apk \
  --channel dev \
  --tag 1.0.0
Prefer local emulators? See Android emulators for the LOCAL_AVD_ID / LOCAL_APK_PATH setup.

7. Write and run your first test

Open the local editor:
npx momentic-mobile app
Create a test, pick the dev channel and 1.0.0 tag, and author a single natural-language step (for example, Tap the Sign in button). Run from the editor, then run from the CLI:
npx momentic-mobile run example-test

8. Verify

  • Check example-test.test.yaml exists in your project root
  • Open the dashboard and check Runs for the result

9. Next steps

Android app setup

WebView debugging, APK packaging, environment tooling

Emulators

Local vs. remote emulators and regions

CI/CD

Run mobile tests on every pull request
Need a full working example? Clone momentic-ai/examples.