Appeon Workspace

Manipulates the various features of the Appeon mobile application and the Appeon Workspace, such as the screen orientation, title bar, assistive touch bar, log file, application information, Appeon Mobile version, etc.

Note: The Appeon Workspace API takes effect in both the mobile app running in Appeon Workspace and the native standalone mobile applications.

eon_mobile_awsex object

Functions
of_clearlog

Description

Clears the mobile app log information.

Supported on mobile client only.

Syntax

aws.of_clearlog ( )

Argument Type

Argument

Description

eon_mobile_awsex

aws

The name of the eon_mobile_awsex object.

Return value

Integer.

1 - Success.

-1 - It is called in PowerBuilder or Appeon Web, or there is an error.

of_getappinfo

Description

Gets the information (such as app name, app URL) of the current Appeon mobile application.

Supported on mobile client only.

Syntax

aws.of_getappinfo ( ref string as_appname, ref string as_appurl )

Argument Type

Argument

Description

eon_mobile_awsex

aws

The name of the eon_mobile_awsex object.

string

as_appname

Returns the name of the current Appeon mobile application.

Returns empty string if it is called in PowerBuilder or Appeon Web or if there is any error.

string

as_appurl

Returns the application URL that is set in the "App URL" field of the current Appeon mobile application.

Returns empty string if it is called in PowerBuilder or Appeon Web or if there is any error.

Return value

Integer.

1 - Success.

-1 - It is called in PowerBuilder or Appeon Web, or there is an error.

of_getapporientation

Description

Detects if the screen orientation of the Appeon mobile application is Landscape or Portrait.

Supported on mobile client only.

This function is only valid for the current running application.

Syntax

aws.of_getapporientation ( )

Argument Type

Argument

Description

eon_mobile_awsex

aws

The name of the eon_mobile_awsex object.

Return value

Integer.

0 - Unknown.

1 - Portrait.

2 - Landscape.

-1 - It is called in PowerBuilder or Appeon Web, or there is an error.

of_getapprotationlock

Description

Detects if the screen rotation of the Appeon mobile application is locked.

Supported on mobile client only.

This function is only valid for the current running application. It is not supported in Appeon Workspace Emulator (For more about the emulator, refer to Launching Appeon Workspace Emulator in Appeon Developer User Guide).

Syntax

aws.of_getapprotationlock ( )

Argument Type

Argument

Description

eon_mobile_awsex

aws

The name of the eon_mobile_awsex object.

Return value

Integer.

1 - Locked.

0 - Unlocked.

-1 - It is called in PowerBuilder or Appeon Web, or there is an error.

of_getassistivetouchbtnvisible

Description

Detects if the assistive touch bar is visible.

Supported on mobile client only.

Syntax

aws.of_getassistivetouchbtnvisible ( )

Argument Type

Argument

Description

eon_mobile_awsex

aws

The name of the eon_mobile_awsex object.

Return value

Integer.

1 - The assistive touch bar is visible.

0 - The assistive touch bar is invisible.

-1 - It is called in PowerBuilder or Appeon Web, or there is an error.

of_getassistivetouchmode

Description

Gets the current assistive touch mode. For more about assistive touch mode, refer to the section called “Event-handling model” in Mobile UI Design & Development Guide (Mobile only).

Supported on mobile client only.

Syntax

aws.of_getassistivetouchmode ( )

Argument Type

Argument

Description

eon_mobile_awsex

aws

The name of the eon_mobile_awsex object.

Return value

Integer.

0 - The assistive touch mode is Left-click.

1 - The assistive touch mode is Right-click.

2 - The assistive touch mode is Drag.

-1 - It is called in PowerBuilder or Appeon Web, or there is an error.

of_getcloseappiconvisible

Description

Detects if the close app icon is visible or not. For more about the close app icon, refer to the section called “Window title bar, menu, & toolbar” in Mobile UI Design & Development Guide (Mobile only).

Supported on mobile client only.

Syntax

aws.of_getcloseappiconvisible ( )

Argument Type

Argument

Description

eon_mobile_awsex

aws

The name of the eon_mobile_awsex object.

Return value

Integer.

1 - The close app icon is visible.

0 - The close app icon is invisible.

-1 - It is called in PowerBuilder or Appeon Web, or there is an error.

of_getdwmousemovemode

Description

Detects if the pbm_dwnmousemove event ID of DataWindow is supported.

Supported on mobile client only.

Syntax

aws.of_getdwmousemovemode ( )

Argument Type

Argument

Description

eon_mobile_awsex

aws

The name of the eon_mobile_awsex object.

Return value

Integer.

1 - Supported.

0 - Unsupported.

-1 - It is called in PowerBuilder or Appeon Web, or there is an error.

of_gettitlebarvisible

Description

Detects if the application title bar is visible or invisible. For more about the titlebar, refer to the section called “Window title bar, menu, & toolbar” in Mobile UI Design & Development Guide (Mobile only).

Supported on mobile client only.

Syntax

aws.of_gettitlebarvisible ( )

Argument Type

Argument

Description

eon_mobile_awsex

aws

The name of the eon_mobile_awsex object.

Return value

Integer.

1 - The title bar is visible.

0 - The title bar is invisible but the normal view icon is visible.

2 - Both the title bar and the normal view icon are invisible.

-1 - It is called in PowerBuilder or Appeon Web, or there is an error.

of_getversion

Description

Gets the version number of Appeon Workspace.

Supported on mobile client only.

Syntax

aws.of_getversion ( ref string as_version )

Argument Type

Argument

Description

eon_mobile_awsex

aws

The name of the eon_mobile_awsex object.

string

as_version

Returns the Appeon Workspace version number.

Returns empty string if it is called in PowerBuilder or Appeon Web, or if there is any error.

Return value

Integer.

1 - Success.

-1 - It is called in PowerBuilder or Appeon Web, or there is an error.

of_getwindowlisticonvisible

Description

Detects if the window list icon is visible or not. For more about the window list icon, refer to the section called “Window title bar, menu, & toolbar” in Mobile UI Design & Development Guide (Mobile only).

Supported on mobile client only.

Syntax

aws.of_getwindowlisticonvisible ( )

Argument Type

Argument

Description

eon_mobile_awsex

aws

The name of the eon_mobile_awsex object.

Return value

Integer.

1 - The window list icon is visible.

0 - The window list icon is invisible.

-1 - It is called in PowerBuilder or Appeon Web, or there is an error.

of_getworkspaceheight

Description

Gets the height (in PBU) of the Appeon Workspace screen. If the workspace title bar is visible, then its height is not included.

Supported on mobile client only.

Syntax

aws.of_getworkspaceheight ( )

Argument Type

Argument

Description

eon_mobile_awsex

aws

The name of the eon_mobile_awsex object.

Return value

Integer

The height of the Appeon Workspace screen.

-1 - It is called in PowerBuilder or Appeon Web, or there is an error.

of_getworkspacewidth

Description

Gets the width (in PBU) of the Appeon Workspace screen.

Supported on mobile client only.

Syntax

aws.of_getworkspacewidth ( )

Argument Type

Argument

Description

eon_mobile_awsex

aws

The name of the eon_mobile_awsex object.

Return value

Integer

The width of the Appeon Workspace screen.

-1 - It is called in PowerBuilder or Appeon Web, or there is an error.

of_log

Description

Writes the log information to the mobile client log, and the default log level is INFO.

Supported on mobile client only.

Syntax

aws.of_log ( value integer ai_level, value string as_info )

aws.of_log ( value string as_info )

Argument Type

Argument

Description

eon_mobile_awsex

aws

The name of the eon_mobile_awsex object.

integer

ai_level

1 - FATAL level.

2 - ERROR level.

3 - WARNING level.

4 - INFO level. (Default value)

5 - DEBUG level.

string

as_info

The log information.

Return value

Integer.

1 - Success.

-1 - It is called in PowerBuilder or Appeon Web, or there is an error.

Usage

For the log path of mobile applications, please refer to the section called “Client Logs” in Appeon Server Configuration Guide for .NET or Appeon Server Configuration Guide for J2EE.

of_sendmail

Description

Sends an email from the mobile application.

Supported on mobile client only.

Syntax

aws.of_sendmail ( value eon_mobile_str_mailcontent astr_content, value string as_recipient[], value string as_cc[], value string as_bcc[], value string as_attachmentfile[] )

Argument Type

Argument

Description

eon_mobile_awsex

aws

The name of the eon_mobile_awsex object.

eon_mobile_str_mailcontent

astr_content

The structure of the email content.

See variable list of eon_mobile_str_mailcontent.

string

as_recipient[]

Specifies the recipient list of the mail.

string

as_cc[]

Specifies the Cc recipient list of the mail.

string

as_bcc[]

Specifies the Bcc recipient list of the mail.

string

as_attachmentfile[]

Attachment file path list.

Return value

Integer. The following return values are effective for the iOS device only. On the Android device, 0 will be returned under all circumstances, because the corresponding mail API from the Android SDK returns no standardized value.

1 - Send the email successfully.

0 - Cancel sending the email.

-1 - Failed to send the email, or it is called in PowerBuilder or Appeon Web, or there is an error.

-2 - The email account is not configured.

-100 - System error.

Code example

Refer to How to generate a PDF file and send it via email for the code example of generating and sending a PDF file via email.

of_setapporientation

Description

Sets the screen orientation of the Appeon mobile application.

The screen orientation is set regardless of the current screen rotation.

After this function is called successfully to set the screen orientation, be sure to call of_setapprotationlock to lock the screen orientation. And do not call of_setapprotationlock before this function is called. If of_setapprotationlock is called before this function is called, this function will have no effect and return -1.

Supported on mobile client only.

Syntax

aws.of_setapporientation ( value integer ai_mode )

Argument Type

Argument

Description

eon_mobile_awsex

aws

The name of the eon_mobile_awsex object.

integer

ai_mode

1 - Sets screen orientation to Portrait.

2 - Sets screen orientation to Landscape.

Return value

Integer.

1 - Success.

-1 - It is called in PowerBuilder or Appeon Web, or there is an error.

of_setapprotationlock

Description

Sets whether to lock the screen orientation of the Appeon mobile application, so the screen orientation will not change with the screen rotation of the device.

This function must be called after of_setapporientation is called successfully to set the screen orientation.

Supported on mobile client only.

Syntax

aws.of_setapprotationlock ( value integer ai_mode )

Argument Type

Argument

Description

eon_mobile_awsex

aws

The name of the eon_mobile_awsex object.

integer

ai_mode

1 - Locks the screen orientation of Appeon mobile application, so it will not rotate when the screen orientation of the device changes.

0 - Unlocks the screen orientation of Appeon mobile application.

Return value

Integer.

1 - Success.

-1 - It is called in PowerBuilder or Appeon Web, or there is an error.

of_setassistivetouchbtnvisible

Description

Sets whether the assistive touch bar is visible.

Supported on mobile client only.

Syntax

aws.of_setassistivetouchbtnvisible ( value integer ai_mode )

Argument Type

Argument

Description

eon_mobile_awsex

aws

The name of the eon_mobile_awsex object.

integer

ai_mode

1 - Sets the assistive touch bar to be visible.

0 - Sets the assistive touch bar to be invisible.

Return value

Integer.

1 - Success.

-1 - It is called in PowerBuilder or Appeon Web, or there is an error.

of_setassistivetouchmode

Description

Sets the assistive touch mode.

Supported on mobile client only.

Syntax

aws.of_setassistivetouchmode ( value integer ai_mode )

Argument Type

Argument

Description

eon_mobile_awsex

aws

The name of the eon_mobile_awsex object.

integer

ai_mode

0 - Sets to the Left-click mode.

1 - Sets to the Right-click mode.

2 - Sets to the Drag mode.

Return value

Integer.

1 - Success.

-1 - It is called in PowerBuilder or Appeon Web, or there is an error.

of_setcloseappiconvisible

Description

Sets whether the close app icon is visible or not.

Supported on mobile client only.

Syntax

aws.of_setcloseappiconvisible ( value integer ai_mode, value string as_title, value string as_message )

Argument Type

Argument

Description

eon_mobile_awsex

aws

The name of the eon_mobile_awsex object.

integer

ai_mode

1 - Sets the close app icon to be visible.

0 - Sets the close app icon to be invisible.

integer

as_title

The title that displays in the dialog box which pops up when the Close App icon is tapped.

string

as_message

The message that displays in the dialog box which pops up when the Close App icon is tapped. A Yes/No button will be displayed in the dialog box. When Yes is tapped, the app will be closed. When No is tapped, the app will not be closed and will continue running.

If as_message is null or blank, then no message box will be displayed and the app will be closed immediately.

Return value

Integer.

1 - Success.

-1 - It is called in PowerBuilder or Appeon Web, or there is an error.

of_setdwmousemovemode

Description

Sets whether to support the pbm_dwnmousemove event ID of DataWindow.

Supported on mobile client only.

Syntax

aws.of_setdwmousemovemode ( value integer ai_mode )

Argument Type

Argument

Description

eon_mobile_awsex

aws

The name of the eon_mobile_awsex object.

integer

ai_mode

1 - Supported.

0 - Unsupported.

Return value

Integer.

1 - Success

-1 - It is called in PowerBuilder or Appeon Web, or there is an error.

of_settitlebarvisible

Description

Sets whether the application title bar is visible or invisible. When the title bar is set to invisible, the application will be displayed in full screen view.

Supported on mobile client only.

Syntax

aws.of_settitlebarvisible ( value integer ai_mode )

Argument Type

Argument

Description

eon_mobile_awsex

aws

The name of the eon_mobile_awsex object.

integer

ai_mode

1 - Sets the title bar to be visible.

0 - Sets the title bar to be invisible, and displays the normal view icon on the top right corner of the window, when it is tapped, the app will return to the normal view (with the title bar visible again).

2 - Sets the title bar to be invisible, and displays no icon for showing the title bar again.

Return value

Integer.

1 - Success.

-1 - It is called in PowerBuilder or Appeon Web, or there is an error.

of_setwindowlisticonvisible

Description

Sets whether the window list icon is visible or not.

Supported on mobile client only.

Syntax

aws.of_setwindowlisticonvisible ( value integer ai_mode )

Argument Type

Argument

Description

eon_mobile_awsex

aws

The name of the eon_mobile_awsex object.

integer

ai_mode

1 - Sets the window list icon to be visible.

0 - Sets the window list icon to be invisible.

Return value

Integer.

1 - Success.

-1 - It is called in PowerBuilder or Appeon Web, or there is an error.

Structures
eon_mobile_str_mailcontent

Description

Struct.

The content information of an email.

Property

Type

Variable Name

Description

string

s_subject

Specifies the subject of the mail.

string

s_notetext

Specifies the content of the mail body.

boolean

b_html

Sets if the mail format is HTML.