Monitor an Android app's screen automatically and send what it shows to your website.

When this is the right tool

Use it when the value only exists in a mobile app: an order or delivery status, a balance, a price, a queue position, a stock level. If the same data is on a website, a browser script is cheaper; if the service has an API, use that. And read the app's terms first: some forbid automated access, even to your own account.

Set the phone up once

  1. Create a phone for this job and install the app, from the Play Store or as an APK.
  2. Sign in yourself through a live view link, so your password and any code sent to your phone never pass through a script.
  3. Note the element to read. Open the screen and run phonebox look: each line shows an element's text and its resource ID after #, such as #order_status. The ID survives a redesign better than the text around it.
  4. Park the phone. It keeps the app and the sign-in and costs nothing while it waits.

The check

This script reads one value and posts it as JSON. maxDuration caps the run, so a hung check can't keep billing, and finally parks the phone even when something fails:

check-status.mjs
import { Phonebox } from "phonebox";

const pb = new Phonebox(); // reads PHONEBOX_API_KEY
const phone = await pb.phones.get(process.env.PHONEBOX_PHONE);
try {
  await phone.start({ maxDuration: 120 }); // waits until ready; parks itself after 2 minutes at most
  await phone.open("com.example.courier");
  await phone.waitFor({ id: "order_status" }, { timeoutMs: 30_000 });
  const screen = await phone.observe();
  const status = screen.elements.find((e) => e.id?.endsWith(":id/order_status"))?.text;
  if (!status) throw new Error(`No status on the screen:\n${await phone.look()}`);
  await fetch(process.env.WEBHOOK_URL, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({ status, checked_at: new Date().toISOString() }),
  });
} finally {
  await phone.park(); // billing stops; the app stays signed in
}

When the value isn't a single element, for example a table of prices, pass the output of phone.look() to a model and ask it for JSON in the shape your website expects. The screen text is short, so this costs a fraction of a cent per check.

When the app signs you out

Apps end sessions. Instead of failing silently, have the script recognize a sign-in screen and send you a live view link to sign in again:

When the app signs you out
} catch (error) {
  if ((await phone.look()).includes('"Sign in"')) {
    const { url } = await phone.live({ expiresIn: 3600 });
    await notifyMe(`The courier app signed out. Sign in again within an hour: ${url}`);
  }
  throw error;
}

Anyone with the link controls the phone until it expires, so send it only to yourself. An open live view keeps the phone from idling out; it still parks at its max_duration.

Schedule it, and what it costs

crontab -e
PHONEBOX_API_KEY=pbx_…
PHONEBOX_PHONE=ph_7kx2m6q4v3ta
WEBHOOK_URL=https://example.com/hooks/order-status
0 * * * * cd /opt/app-checks && node check-status.mjs

Use an Agent key limited to this one phone, so the key on your server can't touch anything else. GitHub Actions on a schedule works the same way; the scheduling guide has a workflow that also checks your credit first.

Phone time a month for a check of about two minutes at $0.06 a minute
How oftenChecks a monthPhone time a month
Every 15 minutes2,880$345.60
Every hour720$86.40
4 times a day120$14.40
Once a day30$3.60

Starting a parked phone usually takes under a minute or two, and that time is billed like the rest, so budget about two minutes a check.

Starter is $20 a month and includes $20 of phone time, which covers four checks a day. If you need a value every few minutes, an app that offers notifications or an API is the better source.

Questions

How can I monitor a mobile app's screen and send the status to my website?

Keep a cloud Android phone signed in to the app, and on a schedule have a script start it, open the app, read the value from the screen as text, post it to your website's webhook and park the phone. Phonebox's SDK and CLI do each step; a parked phone keeps the sign-in and costs nothing.

Can I automate an Android app that has no API?

Yes, by using its screens: read the screen, tap and type, and read again. A script works for fixed checks like reading a status; an AI agent works when the steps vary. Check the app's terms of service first.

How much does it cost to check an app every hour?

On Phonebox, about $86 a month: 720 checks of about two minutes each, start included, at $0.06 a minute. Four checks a day cost about $14 a month, and one a day about $3.60.

Get started with Phonebox. New accounts start with a free 7-day trial, card required.

The Phonebox team

← All guides