Skip to main content

background

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

Send the app in front to the background for a number of seconds, then bring the same app back — resumed where it was, not relaunched — and confirm it is in front again. These call app_background.

background​

public void background(double seconds)
public void background(double seconds, String app)

Sends the app in front away and brings it back, resumed rather than relaunched, confirmed in front again — how a resume path is tested.

@param seconds how long it stays away, more than 0 and at most 180

Sends a named app, which must be in front, away and brings it back.

@param seconds how long it stays away, more than 0 and at most 180 @param app the package name (Android) or bundle id (iOS)

Examples​

Send the app away for five seconds, and bring it back​

device.background(5); // back in front, resumed, when this returns

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

com.android.settings was in the background for 5s and is in front again