WL.Client.connect(options)
This method forms a connection to the Worklight Server. It must be executed before any other API
calls from the client which may also wish to connect to the server.
• options – The options passed into the connect request. This object contains the following
definable properties:
◦ onSuccess – A function that is called when the connection to the Worklight Server
has been completed.
◦ onFailure – A function that is called when a request to connect with the Worklight
Server fails. The function is passed an error indication.
◦ timeout – How many milliseconds we should wait before giving up on the
connection.
The function can cause events to occur:
• WL.Events.WORKLIGHT_IS_CONNECTED
• WL.Events.WORKLIGHT_IS_DISCONNECTED
WL.Client.deleteUserPref(key, options)
This method deletes a user preference specified by the "key" parameter.
WL.Client.getAppProperty(propertyName)
This method retrieves a value for a specified property.
The properties that can be retrieved are:
Name Description
WL.AppProperty.AIR_ICON_16x16_PATH
WL.AppProperty.AIR_ICON_128x128_PATH
WL.AppProperty.DOWNLOAD_APP_LINK
WL.AppProperty.APP_DISPLAY_NAME
WL.AppProperty.APP_LOGIN_TYPE
WL.AppProperty.APP_VERSION
WL.AppProperty.LANGUAGE
WL.AppProperty.LATEST_VERSION
WL.AppProperty.MAIN_FILE_PATH
WL.AppProperty.SHOW_IN_TASKBAR
For Adobe AIR apps only, should the app show in the task
bar.
WL.AppProperty.THUMBNAIL_IMAGE_URL
An absolute URL for the thumbnail image for the
application.
WL.Client.getEnvironment()
Returns the environment in which the application is running, possible values include:
• WL.Environment.ADOBE_AIR
Page 104
Comentários a estes Manuais