The long version

How it works

What it looks at, what it refuses to do, and what the phone has to allow.

Idle Hands is an Android app that sits through rewarded ads so you do not have to. This page is the long version: what it looks at, what it refuses to do, and what the phone has to allow. The short version is on the front page.

Pixels and activities, not the page

Rewarded ads render inside their own sandbox. Code injected into a game cannot see into the ad, cannot tell when it ends, and cannot press its close button. So Idle Hands never touches the game at all. It reads the screen the way you do, and it reads one thing you cannot: the name of the Android activity in front.

Every ad network opens its own activity, and that name is the same in every game that serves it. Google AdMob is one class name whether the game is a weapon RPG or a cat sudoku. That is the game-agnostic signal. Idle Hands identifies the network from it, applies that network’s timings, and never needs to know what the game looks like.

Two kinds of knowledge

The engine knows nothing about any game or any network. Both are data, kept in separate folders because they change at different rates and for different reasons.

  • A network pack describes one ad platform: how to recognize it, how long its spots run, where the exit tends to be, and what must never be tapped. Capture AdMob’s close button once and every game serving AdMob gets it for free.
  • A game profile describes one game: its window, its own screens, and the buttons that start an ad. This is the optional half.

Adding a network is a folder. Adding a game is a folder. Neither hardcodes the other.

The floor is a window, not a number

After an ad starts, Idle Hands issues no taps at all until the ad is done. A fixed timer turned out to be wrong in both directions: too long, and the phone’s game lock re-engages during the dead time; too short, and the spot is interrupted, the game shows an error, and nothing is paid. So the floor has two edges and a signal between them.

  • The soft minimum. Never leave before this. A close that appears on the first frame is a skip, and taking it robs the advertiser and forfeits the reward.
  • The hard floor. Leave by this point regardless. It is the value at which rewards were credited in practice, roughly half a minute on most networks.
  • Between them, leave the moment the ad signals it is done: a close X, a “Reward granted” card, a round X on the end card. That is the ad saying the reward is earned. It is a look, never a tap, so it works even when the phone is not accepting touch.

Some networks have no exit art at all and give no signal. Those fall to the hard floor, which is the old safe behavior. A spot that ends by itself and hands the game back ends the wait too.

The exit ladder

Every network hides the door somewhere different, and some hide it altogether. After the floor, Idle Hands tries these in order, and each rung exists because some real ad needed it.

  1. The ad’s own exit control, from the pack: a close X, a claim button, a round X.
  2. A skip-forward or “Reward granted” tap, only after the floor, only to clear leftover end-card filler.
  3. Android Back.
  4. Home, then relaunch the game. This never touches the creative.
  5. Tapping the ad’s own call to action and backing out of the store. Opt-in per network, last resort, logged loudly, counted separately.

Some ad players ignore a tap on their own close button. Back and Home are key events, which always work, so they are the dependable exits and the pixel close is the fast path.

The forbidden list, and the dim guard

Each pack carries a list of controls that must never be tapped as an exit: the skip button, the install button, the “Learn more” pill. Ad creatives put the install button exactly where the close usually goes. Any exit candidate that overlaps a forbidden match is passed over in favor of the next one. Refusing the skip is what makes no-skipping structural rather than a matter of timing.

Template matching ignores brightness, which means a close X still matches through a lock screen. So no tap is ever sent into a frame that is too dark to be a real screen, and the phone’s own power state confirms it. This is what stops the app tapping a locked phone.

Universal handling, bespoke triggering

The two halves of the job are developed separately, on purpose.

Handling an ad is universal. How to sit through one and get out is the same in every game, because networks render identically no matter whose game serves them. Idle Hands takes over any ad that reaches the screen, however it got there, including one you started by hand.

Starting an ad is per game. Every game surfaces its offers differently, so teaching Idle Hands to tap the watch-ad icon on its own is a small amount of work per game, and it is the less important half. A new game gets ad-clearing for free the moment it is installed; it gets automatic offers once someone has taught it that game’s buttons.

Any game

Idle Hands does not carry a game’s name anywhere in the exit path. It tracks the app an ad interrupted and returns to that app. When a second game (Meowdoku) served an ad during testing, it cleared the ad and went back to Meowdoku, which is the moment it stopped being an XP Hero bot.

On the phone

The shipped app runs the whole loop on the device. It uses an accessibility service, which is what gives an app the two things this needs: to know which window is in front, and to press Back, Home, and the occasional close button. It reads window events and dispatches gestures. It does not read text out of other apps.

What the phone has to allow, and why:

Permission Used for
Accessibility service Which app is in front, screenshots on the device for matching, Back and Home, taps.
Usage data access Seeing when an ad closes. An ad opens with a window event and closes silently; this is the only way to notice the game is back.
Display over other apps The floating status widget with a one-tap pause.
Notifications The foreground service. Samsung freezes background apps the moment a game takes the screen, and a frozen brain is a dead one.

What it never asks for: your PIN, your screen lock off, or root. Samsung’s game lock still comes down on its own after a stretch without touch; Idle Hands clears it the way a finger does, and falls back to Home and relaunch if that does not take.

The ledger

Every spot it watches is logged: the network, the timeline of what appeared when, how it left, whether the game came back, and a visual signature of the frames. A person marks each one paid or unpaid and points out any close button the app missed. Each label becomes a template, and an unknown network is registered from its activity name as a one-line pack. Ad formats keep changing and new networks keep appearing; the database has to keep learning or the whole thing rots in a month.