background image
Original Author Paul Laughton, 2011
Page 144
De Re BASIC!
realsize[]: The current real size of the screen in pixels, including system decorations. NOTE: this value is
available only on devices running Android version 4.2 or later. On other devices, the values will be the
same as in the size[] array parameter.
density: A standardized Android density value in dots per inch (dpi), usually 120, 160, or 240 dpi. This is
not necessarily the real physical density of the screen. This value never changes.
Screen.rotation <nvar>
Returns a number in the <nvar> parameter representing the current orientation of your screen relative
to the "natural" orientation of your device. The natural orientation may be portrait or landscape, as
defined by the manufacturer. The return value is a number from 0 to 3. Multiply by 90 to get the
rotation in degrees clockwise.
Screen.size, size[], realsize[], density
Returns information about the size and density of your screen.
You may provide numeric array variables to get the "application size" and "real size" of the screen.
A size is returned as two values, width first and height second, in a two-element array. If the array
exists, it is overwritten. Otherwise a new array is created.
Provide a simple numeric variable to get the density of the screen.
All parameters are optional. Use commas to indicate omitted parameters (see Optional Parameters).
size[]: The size of the screen in pixels available for applications. This excludes system decorations. The
width and height values reflect the current screen orientation.
realsize[]: The current real size of the screen in pixels, including system decorations. NOTE: this value is
available only on devices running Android version 4.2 or later. On other devices, the values will be the
same as in the size[] array parameter.
density: A standardized Android density value in dots per inch (dpi), usually 120, 160, or 240 dpi. This is
not necessarily the real physical density of the screen. This value never changes.
If your program is running in Graphics mode, "SCREEN.SIZE xy[], , dens" returns the same values as
"GR.SCREEN x, y, dens". Unlike Gr.screen, Screen.size also works in Console and HTML modes.
WiFi.info {{<SSID_svar>}{, <BSSID_svar>}{, <MAC_svar>}{, <IP_var>}{,
<speed_nvar>}}
Gets information about the current Wi-Fi connection and places it in the return variables.
All of the parameters are optional; use commas to indicate omitted parameters (see Optional
Parameters). The table shows the available data:
Variable
Type
Returned Data
Format
SSID
String
SSID of current 802.11 network "name" or hex digits (see below)