Block reference / Device Management
Get device property
Read one fact about the phone, such as its model, Android version, battery level or IP.
Only in
WarpX Phone
Get device property reads one fact about the phone into a variable or the table: what it is, which Android it runs, how full its battery is, its Wi-Fi address, its language and time zone, or any system property by name. Use it to label results by phone, to check the battery before a long run, or to confirm what Change device or Phone identity set.
76, into {{variables.battery}} without touching the screen.Settings
- Property
Model, Brand, Manufacturer, Android version (such as
14), SDK level (such as34), Serial number, Battery (%), Charging (true / false), Wi-Fi IP address, Screen size (such as1080x2400), Language, Time zone, Build fingerprint, or Another property (getprop)… to name one.ExampleBattery (%)- getprop namewhen Property is Another property (getprop)…
The system property to read, as
getpropnames it, such asro.build.version.security_patch. Letters, digits,.,_and-only.Examplero.build.version.security_patch- Assign to variable
Stores the value in a workflow variable.
ExampleChecked- Variable namewhen Assign to variable is on
The variable to write. Later blocks read it as
{{variables.battery}}; start the name with$push:to add to a list instead of replacing it.Examplebattery- Insert to table
Writes the value into a column of the workflow's table. Only offered once the table has columns (Table in the toolbar).
ExampleUnchecked- Select columnwhen Insert to table is on
The table column to write to.
Examplebattery- 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
The value, always as text, goes to the variable and to the chosen column if ticked, and is handed on as {{prevBlockData}}. A property the phone does not have reads as empty text.
Example: Skip a phone whose battery is low
- Start
- Get device property
- Conditions
- Start app
- Pick the phone in the toolbar's phone menu.
- Add a Get device property block, set Property to Battery (%) and Variable name to
battery. - Add a Conditions block that checks whether
{{variables.battery}}is less thannumber::20. - Connect the low-battery path to the end of the workflow, and the other path to a Start app block.
- Click Run and open Logs to see the level read, such as
76.
Good to know
- Assign to variable is ticked by default, with Variable name
property; name it after what you read, such asbattery, when a workflow reads more than one. Left empty, nothing is written. - Wi-Fi IP address is the phone's address on its Wi-Fi network, not its public IP, and is empty when the phone is not on Wi-Fi. For the address sites see, use Check network.
- Screen size reads the size as it is now, so after Change device has set one it reads the new size.
- A property name with other characters fails with
Write a property name, e.g. ro.build.version.security_patch.
See also
- Check network — Check whether the phone reaches the internet, and read the public IP sites see it at.
- Change device — Change what the phone says it is: its name, its model and brand, its screen size and density.
- ADB command — Run a command in the phone's shell, as
adb shelldoes, and keep what it prints. - Conditions — Send the run down one of several paths, depending on values, page elements or code.