eSpace Name
ClientDevice_Lib
Description
Module that expose client action to retrieve info about battery,location,network and Browser context of the current device.
Provides information about the system's battery charge level.
Input parameters
-----
Output parameters
Name
DataType
IsApiSupported
Indicate if the current context supports the api
Boolean
IsCharging
A Boolean value indicating whether the battery is currently being charged.
ChargingTime
A number representing the remaining time in seconds until the battery is fully charged, or 0 if the battery is already fully charged
Integer
DischargingTime
A number representing the remaining time in seconds until the battery is completely discharged and the system suspends
Level
A number representing the system's battery charge level scaled to a value between 0.0 and 1.0
Decimal
Return the info of the current browser.
UserAgent
Returns the user agent string for the current browser
Text
CookieEnabled
Returns a Boolean value that indicates whether cookies are enabled or not.
HardwareConcurrency
Returns the number of logical processors available to run threads on the user's computer
Language
Returns a string representing the preferred language of the user, usually the language of the browser UI
PreferredLanguages
Returns an array of strings representing the user's preferred languages
Text List
MaxTouchPoints
The maximum number of simultaneous touch contact points are supported by the current device.
PdfViewerEnabled
Indicates whether the browser supports inline display of PDF files when navigating to them.
Get the current position of the device.
IsSuccess
Indicate if the operation is completed with success status
ErrorCode
1 PERMISSION_DENIED
2 POSITION_UNAVAILABLE
3 TIMEOU
Accuracy
Returns a double representing the accuracy of the latitude and longitude properties, expressed in meters.
Altitude
Returns a double representing the position's altitude in meters, relative to sea level. This value can be null if the implementation cannot provide the data.
Longitude
Returns a double representing the position's longitude in decimal degrees.
Latitude
Returns a double representing the position's latitude in decimal degrees.
Provides information about the connection a device is using to communicate with the network.
IsOnline
Indicate if the client is connected.
Downlink
Returns the effective bandwidth estimate in megabits per second, rounded to the nearest multiple of 25 kilobits per seconds.
EffectiveType
Returns the effective type of the connection meaning one of 'slow-2g', '2g', '3g', or '4g'. This value is determined using a combination of recently observed round-trip time and downlink values.
Rtt
Returns the estimated effective round-trip time of the current connection, rounded to the nearest multiple of 25 milliseconds.
IsSaveData
Returns true if the user has set a reduced data usage option on the user agent.