Block reference / Device Management
Reconnect
Drop the phone's ADB connection and make it again, then wait until it answers.
Only in
WarpX Phone
Reconnect is for a phone that has stopped answering WarpX Phone: a Wi-Fi connection gone stale, or a USB link that hung. A phone on Wi-Fi is disconnected and connected again; a phone on USB has its connection restarted by ADB. The block then waits until the phone is back, and fails if it is not.
Settings
- Wait for it to come back (ms)
How long to wait for the phone to be listed again, from
5000to120000milliseconds. The default is30000.Example30000- Delay (ms)
A wait after the block finishes, before the next one starts. One number such as
1000, or a range such as1000,3000for a random wait in that range on each run.Example0
Every block also has the shared block settings — a description, Disable block and what to do on an error. Fields that take text accept data from earlier blocks.
What it hands on
Writes nothing and hands nothing on. It leaves by its output once the phone is back.
Example: Bring a Wi-Fi phone back when a block cannot reach it
- Start
- Start app
- Reconnect
- Start app
- Pick the phone in the toolbar's phone menu; it is connected over Wi-Fi.
- On the Start app block that starts the run, open its settings and set On error to Execute fallback.
- Connect its fallback output to a Reconnect block with Wait for it to come back (ms) set to
45000. - Connect Reconnect to a second Start app block for the same app.
- Click Run. If the phone was not answering, Logs shows Reconnect and then the app starting.
Good to know
- It works on a phone that is offline or not answering, which the other phone blocks refuse.
- Over USB it runs
adb reconnect, which needsadbon this computer; without it the block fails withADB_UNAVAILABLE. - A phone not back in time fails with
RECONNECT_TIMEOUT.
See also
- Check network — Check whether the phone reaches the internet, and read the public IP sites see it at.
- ADB command — Run a command in the phone's shell, as
adb shelldoes, and keep what it prints. - Start app — Open an app by its package, installing it first if the phone has not got it.