Static-value variables are called Global Variables in the Global Variables dialog. They are variables that contain static information about the mobile device, such as the device's type and dimensions. Values of static variables do not change during the execution of the project. They are displayed in the Global Variables dialog (Project | Global Variables). In the dialog, the header of the Value column displays the mobile device that is selected in the Device Selector combo box. For example, the variable $MT_Android has a value of true() when the mobile device being used is an Android device. (Device information is sent by the device as part of standard mobile communication procedures.)
Note: | Please see the Global Variables dialog for a complete list of variables and their descriptions. |
DescriptionThese are a set of variables (see table below) that indicate the device type. They can be used to specify actions that are conditional on the device type. For example: if ($MT_iOS=true()) then 'http://www.apple.com/' else 'https://www.altova.com'. Information about the client device is sent by the device. If the solution runs on a particular device, then the corresponding global variable (see table below) is set to true(); all the other variables in the group are set to false(). All these variables can then be used in XPath/XQuery expressions. MT_Android | true() | false() | MT_Browser | true() | false() | MT_iOS | true() | false() | MT_iPad | true() | false() | MT_Windows | true() | false() | MT_WindowsPhone | true() | false() |
|
DescriptionThese variables indicate whether SMS and telephony services are available on the mobile device, and can be used to make checks before initiating SMS or call actions. Information about the communications capability is received from the client device. Values can be true() or false(). If these functions are not available (for example, when the client is a web browser) then these variables are undefined. MT_SMSAvailable | true() | false() | "" (empty string) | MT_TelephonyAvailable | true() | false() | "" (empty string) |
|
DescriptionThese variables indicate whether a camera application and geolocation tracking are available on the mobile device. They can be used to make checks before initiating image-taking, geolocation-related, or NFC-related actions. Information about the feature availability is received from the client device. Values can be true() or false(). If these functions are not available (for example, when the client is a web browser) then these variables are undefined. MT_CameraAvailable | true() | false() | undefined | MT_GeolocationAvailable | true() | false() | undefined | MT_NFCAvailable | true() | false() | undefined |
|
DescriptionThe absolute height and width of the device's display are held by these variables as pixel values. The resolution is in terms of dpi (pixels per inch), in the X and Y dimensions. The $MT_DPIX and $MT_DPIY variables for iOS devices are empty. MT_DeviceHeight | Length value in pixels | MT_DeviceWidth | Length value in pixels | MT_DPIX | Horizontal pixel density in pixels per inch | MT_DPIY | Vertical pixel density in pixels per inch |
|
DescriptionPages and some page controls have different default colors on different devices. Knowing the default colors is useful for designing the look of the page. For example, a label's background color can be set conditionally according to what the default label text color on the device is: if ($MT_LabelTextColor = '#000000') then '#FFFFFF' else '#000000'. The default colors are received from the client device and are hexadecimal values, e.g: #336699 and #ffaaff. MT_ButtonBackgroundColor | Background color of buttons; Hex values, e.g: #ffaaff | MT_ButtonTextColor | Text color of buttons; Hex values, e.g: #336699 | MT_EditFieldBackgroundColor | Background color of edit fields; Hex values, e.g: #ffaaff | MT_EditFieldTextColor | Text color of edit fields; Hex values, e.g: #336699 | MT_LabelBackgroundColor | Background color of labels; Hex values, e.g: #ffaaff | MT_LabelTextColor | Text color of labels; Hex values, e.g: #336699 | MT_PageBackgroundColor | Background color of pages; Hex values, e.g: #ffaaff |
|
The Solution Execution provides a setting for passing an authentication token to a web page when the solution is executed on web clients. This variable holds the authentication data sent by the action. |
The language on the client device. |
Parameter values are passed to the solution when the solution is started. These values are stored in the MT_InputParameters variable. By default the data structure that is stored in the variable is a map (for example: {"name":"Altova", "location":"Boston"}). You can change the data structure of this variable in individual projects (in the More Project Settings dialog) to be a sequence of values (for example: ("Altova", "Boston")). Currently, parameter values are passed to the solution when a hyperlink to the solution is clicked or when the OnServerDeployment event is triggered. If the hyperlink's URL has a query string that contains parameter values, then these are passed to the solution when the link is clicked and the solution is started. The parameter values in the query string must be in key:value format. The MT_InputParameters variable holds parameter values either (i) as a map, or (ii) as a sequence of string-value items that are alphabetically sorted on the query keys. If the values are stored in a map, then the key:value pairs are stored. If the values are stored as a sequence of strings, then the strings are indexed alphabetically on their keys. The latter case can be explained with an example, Say the query has three keys. When the keys and their are received by the solution, the keys will be sorted alphabetically and their respective values will be stored as the corresponding items, by index position, in the MT_InputParameters sequence of string values. To retrieve a single parameter value from the sequence of values, you must know that parameter's index position in the sequence. You can then use this position in an XPath locator expression, for example: $MT-InputParameters[1]. will return the first item in the sequence of string values. For more information about hyperlinking and the MT_InputParameters variable, see Hyperlinking to Solutions. |
Indicates whether the current solution is running as an AppStore App or not. Allowed values are true() or false(), with the default being false(). |
Indicates whether the current solution is running embedded in a webpage or not. Allowed values are true() or false(), with the default being false(). |
Indicates, using the values listed in the table below, the kind of simulation that is currently running. The empty-sequence value indicates that the solution is running in an actual end-user scenario, and not in a simulation. $MT_SimulationMode is useful, for example, if you want to provide conditional processing depending on what kind of simulation (or actual use) is currently running. See the section Simulation for more information. "designer" | Simulation runs directly in designer | "designer-server" | Simulation with a standalone server | "designer-client" | Simulation is a trial run on client | () | Server to client/browser, run by end user |
|
The name with which to log in to MobileTogether Server. |
|