ScriptTap
StateGet

Command video guide

StateGet

StateGet reads current device information into typed variables for conditions, calculations and later commands. It does not change the settings it reads. This Overview tours all 27 groups without running the script. The Orientation Demo tab preserves the complete working StateGet → PromptMe example.

Enable only the groups needed. Give each enabled group at least one selected output, using its displayed Integer, Decimal, Boolean or String type and a distinct destination. Blank output fields are not requested. A group switched OFF does not request its retained fields. Each execution takes new readings; StateGet is not a background monitor.

Battery and Charge Time read charging information. Power and Advanced Power read power-saving and idle states; the two Thermal groups require their displayed Android versions. Display reads state, orientation, dimensions and refresh rate. Display Settings and Device Lock read existing settings and lock state without changing them. Audio reads volumes and audio state; Music Active is not proof that a particular media player is playing. Do Not Disturb reads the interruption mode.

Network and Network Conditions read connection information. Estimated connection speeds and Wi-Fi Link Rates are not measured traffic. Network Traffic reads sampled Integer receive/transmit rates in KiB/s. Naming RX or TX reveals Sample Time. Enter a valid literal 250–60000 ms; 1500 ms is one and a half seconds. The fresh editor field may be blank and is incomplete until configured. Selected RX/TX share one sample and the command waits for it before publishing the available results. The Overview entry i1 / 1500 is only an unsaved configuration draft, not a measured result.

Cellular Signal, NFC, Location Services and Airplane Mode read their current state. Location Services does not return coordinates. Memory and Storage sizes use MiB; Uptime uses seconds. Cellular Network and Call State depend on phone hardware/access. Bluetooth needs Nearby Devices access on Android 12+. Flashlight reads supported torch state; strength needs API 33+. No permission, radio, audio or torch setting is changed here.

Availability depends on Android version, hardware and access. An unavailable reading leaves its destination unchanged rather than writing zero or empty text. Initialize a fallback when needed. StateGet has no separate Success/Error outputs. Run Logs summarize selected keys and availability counts without recording returned values. This Overview closes its draft without saving and never presses Play.

All 27 state groups and output types

API numbers are Android platform levels. Availability also depends on hardware and access. Blank outputs are not requested. Use a unique, correctly typed destination for each selected output.

GroupOutputsAvailability
BatteryLevel (Integer, %); Charging (Boolean); Power Source (String); Status (String); Health (String); Temperature °C (Decimal); Voltage mV (Integer); Current mA (Decimal); Capacity mAh (Decimal); Energy Wh (Decimal)API 26+.
Charge TimeRemaining Seconds (Integer); Is Charging (Boolean)API 28+.
PowerPower Saver (Boolean); Device Idle (Boolean); Screen Interactive (Boolean)API 26+.
Advanced PowerLight Idle (Boolean); Low Power Standby (Boolean)API 33+.
Thermal StatusLevel (Integer, 0–6)API 29+.
Thermal HeadroomHeadroom (Decimal)API 30+.
DisplayState (String); Orientation (String); Width (Integer); Height (Integer); Refresh Rate (Decimal, Hz)API 26+.
Display SettingsBrightness (Integer, %); Adaptive (Boolean); Rotation Lock (Boolean); Timeout Milliseconds (Integer); Dark Mode (Boolean); Clock Format (String)API 26+.
Device LockLocked (Boolean); Secure Lock Configured (Boolean)API 26+.
AudioMusic Active (Boolean); Microphone Muted (Boolean); Ringer Mode (String); Output Route (String; API 33+); Call Volume (Integer, %); Media Volume (Integer, %); System Volume (Integer, %); Alert Volume (Integer, %); Message Volume (Integer, %)API 26+.
Do Not DisturbCurrent Mode (String)API 26+.
NetworkConnected (Boolean); Internet Validated (Boolean); Transport (String); Metered (Boolean); VPN Active (Boolean); Captive Portal (Boolean); Estimated Download KB/s (Integer); Estimated Upload KB/s (Integer); Data Saver (String)API 26+.
Network ConditionsRoaming (Boolean); Congested (Boolean); Suspended (Boolean)API 28+.
Network TrafficRX KB/s (Integer); TX KB/s (Integer)API 26+.
Wi-FiEnabled (Boolean); Connected (Boolean); Signal Level (Integer, 0–4); Link Speed Mbps (Integer)API 26+. Wi-Fi hardware.
Wi-Fi Link RatesRX Mbps (Integer); TX Mbps (Integer)API 29+. Wi-Fi hardware.
Cellular SignalLevel (Integer, 0–4)API 28+. Telephony radio support.
NFCEnabled (Boolean)API 26+. NFC hardware.
Location ServicesEnabled (Boolean)API 26+.
Airplane ModeEnabled (Boolean)API 26+.
MemoryAvailable MB (Integer, MiB); Total MB (Integer, MiB); Low Memory (Boolean)API 26+.
StorageFree MB (Integer, MiB); Total MB (Integer, MiB)API 26+.
UptimeSeconds (Integer)API 26+.
Cellular NetworkGeneration (String)API 26-32 / 33+ basic. Telephony radio support. Phone State on API 26–32; Basic Phone State on API 33+.
Call StateState (String)API 26+. Phone-call support. Phone State access.
BluetoothEnabled (Boolean); Audio Connected (Boolean); Headset Connected (Boolean)API 26+. Bluetooth hardware. Nearby Devices access on API 31+.
FlashlightEnabled (Boolean); Strength (Integer; API 33+)API 26+ / strength 33+. Camera flash hardware.

Network Traffic RX/TX are sampled Integer KiB/s rates, sharing one 250–60000 ms interval (default 1500 ms). Network estimated speeds are connection estimates, not measured traffic. Memory/storage values use binary megabytes (MiB). Music Active is Android audio activity, not verified player state. Location Services reports enabled state, not coordinates.

Overview

Step-by-step guide

  1. Step 01

    StateGet reads current device information into variables, so later commands can make decisions using it. It does not change the device settings. This overview explains all twenty-seven groups and their selection controls, without running a demonstration.

    StateGet: Overview step 1: StateGet reads current device information into variables, so later commands can make decisions using it. It does not change the device settings. This overview explains all twenty-seven groups and their selection controls, without running a demonstration.
  2. Step 02

    Drag StateGet from Device into the script, then open the new row. The number at the top is this device's Android A P I level, which helps explain unavailable options.

    StateGet: Overview step 2: Drag StateGet from Device into the script, then open the new row. The number at the top is this device's Android A P I level, which helps explain unavailable options.
  3. Step 03

    Each group has its own switch. Turn a group on to reveal its output fields. Name only the outputs you need, using the indicated Integer, Decimal, Boolean or String type. Each enabled group needs at least one destination, and selected outputs need distinct destinations.

    StateGet: Overview step 3: Each group has its own switch. Turn a group on to reveal its output fields. Name only the outputs you need, using the indicated Integer, Decimal, Boolean or String type. Each enabled group needs at least one destination, and selected outputs need distinct destinations.
  4. Step 04

    Battery reads percentage, charging, power source, status and health, plus temperature and electrical information. Scroll within the form to find voltage, current, capacity and energy. These are readings into variables, not controls for charging the device.

    StateGet: Overview step 4: Battery reads percentage, charging, power source, status and health, plus temperature and electrical information. Scroll within the form to find voltage, current, capacity and energy. These are readings into variables, not controls for charging the device.
  5. Step 05

    Charge Time reads the estimated charging time remaining in seconds, and whether charging is active. Power reads power-saving mode, device idle and whether the screen is interactive.

    StateGet: Overview step 5: Charge Time reads the estimated charging time remaining in seconds, and whether charging is active. Power reads power-saving mode, device idle and whether the screen is interactive.
  6. Step 06

    Advanced Power adds light-idle and low-power standby readings on Android A P I thirty-three or later. Thermal Status reports a heating-status level, while Thermal Headroom reports a thermal-headroom estimate. Their Android requirements are shown here; this older emulator cannot enable those groups.

    StateGet: Overview step 6: Advanced Power adds light-idle and low-power standby readings on Android A P I thirty-three or later. Thermal Status reports a heating-status level, while Thermal Headroom reports a thermal-headroom estimate. Their Android requirements are shown here; this older emulator cannot enable those groups.
  7. Step 07

    Display reads the screen state, orientation, pixel width and height, and refresh rate. Enable it to choose the typed destinations. The separate Orientation Demo tab shows how to display one of these results with PromptMe.

    StateGet: Overview step 7: Display reads the screen state, orientation, pixel width and height, and refresh rate. Enable it to choose the typed destinations. The separate Orientation Demo tab shows how to display one of these results with PromptMe.
  8. Step 08

    Display Settings reads brightness, adaptive brightness, rotation lock, screen timeout, dark mode and clock format. Device Lock reads whether the device is locked and whether a secure lock is configured. Neither group changes those settings or locks the device.

    StateGet: Overview step 8: Display Settings reads brightness, adaptive brightness, rotation lock, screen timeout, dark mode and clock format. Device Lock reads whether the device is locked and whether a secure lock is configured. Neither group changes those settings or locks the device.
  9. Step 09

    Audio reads the five volume streams, ringer mode, microphone mute and Android music-audio activity. Music Active does not confirm that a particular player is playing. Output Route needs Android A P I thirty-three or later. Do Not Disturb reads the current interruption mode.

    StateGet: Overview step 9: Audio reads the five volume streams, ringer mode, microphone mute and Android music-audio activity. Music Active does not confirm that a particular player is playing. Output Route needs Android A P I thirty-three or later. Do Not Disturb reads the current interruption mode.
  10. Step 10

    Network reads connectivity, validated internet access, transport, metering, V P N, captive portal, data saver and estimated connection speeds. Those speeds are connection estimates, not measured traffic. Network Conditions adds roaming, congestion and suspension information.

    StateGet: Overview step 10: Network reads connectivity, validated internet access, transport, metering, V P N, captive portal, data saver and estimated connection speeds. Those speeds are connection estimates, not measured traffic. Network Conditions adds roaming, congestion and suspension information.
  11. Step 11

    Network Traffic measures receive and transmit rates. Enable it and name a receive or transmit destination to reveal Sample Time. The R X and T X fields take Integer destinations. We are only viewing the setup, not measuring a result.

    StateGet: Overview step 11: Network Traffic measures receive and transmit rates. Enable it and name a receive or transmit destination to reveal Sample Time. The R X and T X fields take Integer destinations. We are only viewing the setup, not measuring a result.
  12. Step 12

    Sample Time is a measurement interval from two hundred and fifty to sixty thousand milliseconds. Here, fifteen hundred milliseconds means one and a half seconds. Enter a valid value before Play; a blank field is incomplete. Both selected rates share one sample, and StateGet waits for it before publishing the available results.

    StateGet: Overview step 12: Sample Time is a measurement interval from two hundred and fifty to sixty thousand milliseconds. Here, fifteen hundred milliseconds means one and a half seconds. Enter a valid value before Play; a blank field is incomplete. Both selected rates share one sample, and StateGet waits for it before publishing the available results.
  13. Step 13

    Wi-Fi reads enabled and connected states, signal level and link speed. Wi-Fi Link Rates adds receive and transmit link rates on supported Android versions. These describe the wireless link, not the actual traffic measured by Network Traffic.

    StateGet: Overview step 13: Wi-Fi reads enabled and connected states, signal level and link speed. Wi-Fi Link Rates adds receive and transmit link rates on supported Android versions. These describe the wireless link, not the actual traffic measured by Network Traffic.
  14. Step 14

    Cellular Signal reads a signal-strength level on supported phone hardware. N F C reads whether near-field communication is enabled. Neither option turns a radio on or off.

    StateGet: Overview step 14: Cellular Signal reads a signal-strength level on supported phone hardware. N F C reads whether near-field communication is enabled. Neither option turns a radio on or off.
  15. Step 15

    Location Services reads whether location services are enabled; it does not return geographical coordinates. Airplane Mode reads whether airplane mode is enabled, without changing it.

    StateGet: Overview step 15: Location Services reads whether location services are enabled; it does not return geographical coordinates. Airplane Mode reads whether airplane mode is enabled, without changing it.
  16. Step 16

    Memory reads available and total memory and the low-memory flag. Storage reads free and total space. Their size values use binary megabytes, also called mebibytes. Uptime reads elapsed seconds since the device started.

    StateGet: Overview step 16: Memory reads available and total memory and the low-memory flag. Storage reads free and total space. Their size values use binary megabytes, also called mebibytes. Uptime reads elapsed seconds since the device started.
  17. Step 17

    Cellular Network reads the network generation. Call State reads the phone-call state. These depend on phone hardware and the required phone access. Set up any required permission before Play; this overview does not request or use phone information.

    StateGet: Overview step 17: Cellular Network reads the network generation. Call State reads the phone-call state. These depend on phone hardware and the required phone access. Set up any required permission before Play; this overview does not request or use phone information.
  18. Step 18

    Bluetooth reads enabled state, audio connection and headset connection. On Android twelve or later it needs Nearby Devices access. Flashlight reads whether a supported torch is enabled; strength additionally needs Android A P I thirty-three or later. StateGet never turns the torch on.

    StateGet: Overview step 18: Bluetooth reads enabled state, audio connection and headset connection. On Android twelve or later it needs Nearby Devices access. Flashlight reads whether a supported torch is enabled; strength additionally needs Android A P I thirty-three or later. StateGet never turns the torch on.
  19. Step 19

    Available readings depend on Android version, hardware and access. An unavailable reading leaves its destination unchanged; it does not automatically write zero or empty text. Initialize a fallback first when later commands need a known value. StateGet has no separate Success or Error outputs.

    StateGet: Overview step 19: Available readings depend on Android version, hardware and access. An unavailable reading leaves its destination unchanged; it does not automatically write zero or empty text. Initialize a fallback first when later commands need a known value. StateGet has no separate Success or Error outputs.
  20. Step 20

    Each time StateGet is reached, it takes a new reading; it is not a background monitor. This was only an options tour, so close the draft without saving it. Use the Orientation Demo tab for a complete script and a visible result.

    StateGet: Overview step 20: Each time StateGet is reached, it takes a new reading; it is not a background monitor. This was only an options tour, so close the draft without saving it. Use the Orientation Demo tab for a complete script and a visible result.