feInfo

Queries general front-end properties.

Syntax

ui.Interface.frontCall("standard", "feInfo",
 [name], [result]) 
  1. name - The name of the property.
  2. result - Holds the value of the property.

Usage

The feInfo front call returns a front-end property value according to the property name passed in as the parameter.

Some feInfo options take an optional parameter, such as screenresolution:
CALL ui.Interface.frontCall("standard", "feInfo", ["screenResolution", 2], [resolution])
Table 1. Property names and descriptions for the standard.feInfo front call.

feInfo property values

Property name Description GDC GWC-JS GMA GMI
dataDirectory

Returns the directory name that can be used for temporary files on the front-end side. This directory is cleaned at front-end startup and end, and is common to all front-end instances, except GWC.

The possible values returned are:

  • With Genero Web Client, this is not applicable.
  • With Genero Desktop Client, the local cache directory. For example, "/home/username/.cache/Four Js/Genero Desktop".
  • With Genero Mobile for Androidâ„¢, this is the GMA application cache directory. Content may be erased, once the app is closed.
  • With Genero Mobile for iOS, this is the temporary directory in the application sandbox (iOS NSTemporaryDirectory() system call). Content may be erased, once the app is closed.
Yes No Yes Yes
dictionariesDirectory

Returns the directory name where spell checking dictionary files are located.

This parameter is only supported by GDC, for the spellCheck style attribute of TextEdit elements.

A program can query the dictionariesDirectory info in order to send dictionary files to the GDC with an fgl_putfile() call.

Yes N/A N/A N/A
deviceModel Returns the name of the device, e.g. "iPad4,5". Yes No Yes Yes
deviceId
  • With Genero Mobile for iOS, returns the identifierForVendor.
  • With Genero Mobile for Android, returns this IMEI, otherwise the Android id (but may change after device reinstallation)
Yes No Yes Yes
feName

The code identifying the type of front-end component.

The possible values returned are:

  • "Genero Desktop Client" for Genero Desktop Client.
  • "GBC" for Genero Web Client - JavaScript (GWC-JS).
  • "GWC for Genero Web Client - HTML5 theme.
  • "GMA" for Genero Mobile for Android.
  • "GMI" for Genero Mobile for iOS.
Yes Yes Yes Yes
fePath

The installation directory of the front-end executable.

  • With Genero Desktop Client, it returns the path to the installation directory of the GDC.
  • When Genero Web Client, it returns the path to the installation directory of the GAS.
  • With Genero Mobile for Android, it returns the installation directory. For example, "/data/data/com.fourjs.gma/fgl".
  • With Genero Mobile for iOS, it returns the installation directory. For example: "/private/var/mobile/Applications/B3E6-C48A-ED4EFA". Below the installation directory are the "Documents" (which is by default pwd), "GMI.app" (deployed p-code resides in GMI.app/app/) and "tmp" directories.
Important: The installation path returned by this front call may change in future versions, do not based application code on this. On mobile devices, consider using the os.Path.pwd utility function to get the application working directory when executing programs.
Yes No Yes Yes
freeStorageSpace Returns the number of bytes available on the device. Yes No Yes Yes
iccid
  • With Genero Mobile for iOS, returns an error (not allowed).
  • With Genero Mobile for Android, returns the ICCID if available, otherwise raise an error.
N/A N/A Yes Yes
imei
  • With Genero Mobile for iOS, returns an error (not allowed).
  • With Genero Mobile for Android, returns the IMEI if available, otherwise raises an error.
N/A N/A Yes Yes
ip

Returns the IP address of the network interface used for the GUI connection.

For mobile platforms, this is the preferred IP address of the device: if there is WIFI, either the IPv4 address is given back (for example: 192.168.0.12) or if there is no IPv4 address, the IPv6 address is given back (for example: 2a02:810a:82c0:478:d462:e334:6a1d:fb78). If there is no WIFI, either the cellular IPv4 or IPv6 address is given back. If there is no network, NULL is returned.

Yes No Yes Yes
isActiveX

Returns "1" if the front-end runs in Active X mode (GDC specific).

For Genero Mobile clients, the return value will always be "0"

Yes No Yes Yes
numScreens

Number of screens available on the front-end platform.

On typical front-end platforms and devices, the number of screens is 1. In some rare cases, a desktop computer can be configured with more than one screen.

Yes No No No
osType

The operating system type where the front-end is running.

Possible return values include "WINDOWS", "LINUX", "OSX", "ANDROID", "IOS".

Yes Yes Yes Yes
osVersion

The version of the operating system.

Example of returned values: "4.3", "5.10.15".

Yes No Yes Yes
outputMap

Returns the GWC application output map of the current application. This option is only supported with a GAS >= 2.22.00.

Example of returned value: "DUA_HTML5", ...

No No No No
ppi

Returns the screen pixel density of the front-end platform (Pixels Per Inch). This front call takes an optional screen number as parameter (1 is the default).

  • With Genero Mobile for iOS, returns the PixelsPerInch of a iOS device.
  • With Genero Mobile for Android, returns the DPI (ppi == dpi)
Yes No Yes Yes
screenResolution

Returns the screen resolution of the front-end platform. This front call takes an optional screen number as parameter (1 is the default).

Example of returned values: "1200x1824", "1920x1104".

Note: For mobile devices, the value can change depending on the device orientation.
Yes Yes Yes Yes
target

Returns the build platform target code name, identifying the operating system the front-end binary was compiled. This front call is provided for debugging purpose, do not base code on the returned value, it can change if the target OS version is upgraded for example. Use the ostype property instead.

Example of returned values:
  • "w32v100" = Windows 32 bits, Visual C++ 10.
  • "w64v110" = Windows 64 bits, Visual C++ 11.
  • "d32a040" = Android 4.0 ARM 32 bits.
  • "d32x040" = Android 4.0 x86 32 bits.
  • "i32a070" = iOS 7.0 ARM 32 bits.
  • "i32x070" = iOS 7.0 x86 32 bits.
Note: For GWC-JS, will return the same value as osType.
Yes Yes Yes Yes
windowSize

Returns the current size of the front-end view-port.

  • For mobile front-ends, this is the size of the mobile screen.
  • For Genero Desktop Client, this is the size of the current window.
  • For Genero Web Client, this is the size of the browser webview.

Example of returned values: "1200x1824", "1920x1104".

Yes Yes Yes Yes