AppGetInfo Method (CLIENT)
PLB Web Only, 9.9
The AppGetInfo method retrieves information from a mobile device's information that describes the hardware and software. The method uses the following format:
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. A CLIENT object.
return
Optional. A Character String Variable that receives the mobile device's information formatted as a JSON string.
type
Optional. A Numeric Variable or decimal number that specifies the specific mobile device information to be returned.
options
Optional. A Character String Variable or string literal that controls the behavior of this method.
Flags Affected: EOS
Note the following:
This method is only used for a Sunbelt PL/B Web Client App using Cordova\PhoneGap operations.
The EOS flag is set to TRUE if the {return} variable is too small to receive all of the method data without being truncated.
A zero-length (NULL) parameter is invalid and results in INVALID_ARGUMENT_ERROR. A value of "*" searches all contact fields.
The supported {type} values indicate the type of mobile device information to be retrieved by this method. The supported {type} parameter values are defined as follows:
|
Value |
Tyle |
|
0 |
AppInfoDevice |
|
1 |
AppInfoBattery |
|
2 |
AppInfoNetwork |
|
3 |
AppInfoLanguage |
AppInfoDevice Type
See this link for details on specific operating values identified in this method.
https://www.npmjs.com/package/cordova-plugin-device
The method type returns as JSON notation string with the following fields:
|
Field |
Description |
|
cordova |
The version of Cordova running on the device. |
|
model |
The name of the device's model or product. The value is set by the device manufacturer and may be different across versions of the same product. |
|
platform |
The device's operating system name. |
|
uuid |
The device's Universally Unique Identifier. |
|
version |
The operating system version. |
|
manufacturer |
The device's manufacturer. |
|
isVirtual |
Whether the device is running on a simulator. |
|
serial |
The device hardware serial number. |
AppInfoBattery Type
See this link for details on specific operating values identified in this method.
https://www.npmjs.com/package/cordova-plugin-battery-status
This method type starts application battery monitoring and returns the last battery event data in JSON notation. The JSON notation string contains the following fields:
|
Field |
Description |
|
level |
The percentage of battery charge (0-100). |
|
isPlugged |
A boolean that indicates whether the device is plugged in or not. |
AppInfoNetwork Type
See this link for details on specific operating values identified in this method.
https://www.npmjs.com/package/cordova-plugin-network-information
This method type returns the device's cellar and WIFI connection type in the event data in JSON notation. The JSON notation string with the following field::
|
Field |
Description |
|
type |
The type identifies one of following: UNKNOWN
ETHERNET
CELL_2G CELL_3G CELL_4G CELL NONE |
AppInfoLanguage Type
See this link for details on specific operating values identified in this method.
https://www.npmjs.com/package/cordova-plugin-globalization
This method type returns information about the user's locale, language, and timezone at the client device. This information is returned in JSON notation. The JSON notation string with the following fields:
|
Field |
Description | |
|
Language |
The BCP 47 (Best Current Practice) compliant language identifier tag language: en-US). | |
|
localeName |
The BCP 47 (Best Current Practice) compliant tag for the client's current locale | |
|
date |
A JSON object containing the fields: | |
|
pattern |
The date and time pattern to format and parse date. | |
|
timezone |
The abbreviated name of the time zone on the client. | |
|
utc_offset |
The current difference in seconds between the client's time zone and coordinated universal time. | |
|
dst_offset |
The current daylight saving time offset in seconds between the client's non-daylight saving's time zone and the client's daylight saving's time zone. | |
|
number |
A JSON object containing the fields: | |
|
pattern |
The number pattern to format and parse numbers. The patterns follow Unicode Technical Standard. See link:
http://unicode.org/reports/tr35/tr35-4.html | |
|
symbol |
The symbol to use when formatting and parsing, such as a percent or currency symbol. | |
|
fraction |
The number of fractional digits to use when parsing and formatting numbers. | |
|
rounding |
The rounding increment to use when parsing and formatting. | |
|
positive |
The symbol to use for positive numbers when parsing and formatting. | |
|
negative |
The symbol to use for negative numbers when parsing and formatting. | |
|
decimal |
The decimal symbol to use for parsing and formatting. | |
|
grouping |
The grouping symbol to use for parsing and formatting. | |
The {options} parameter is implemented for future use.
This method can generate PLB events when the AppInfoBattery {type] is being used. Battery event data is returned in ARG1 in JSON notation. The following events are supported and must be registered using the EVENTREG instruction:
|
Value |
Event |
|
114 |
AppEventBattery |
|
116 |
AppEventBatteryLow |
|
117 |
AppEventBatteryCritical |
See Also: CLIENT, Client Methods, Method Syntax
![]() |