Appeon Workspace

Manipulates the various features of the PowerServer mobile application and the Appeon Workspace, such as the screen orientation, title bar, assistive touch bar, log file, application information, PowerServer 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

Properties

powerobject ipo_bindevent

PowerBuilder object bound with the oe_urlschemesucceed event.

string is_bindwithsucceedevent

The name of the event bound with the oe_urlschemesucceed event.

Events
oe_urlschemesucceed

Description

This event is triggered when Appeon Workspace is launched by other PowerServer mobile apps or third-party apps via the URL scheme.

This event can be bound to an object and event using the of_register and of_triggerevent function.

Supported on mobile client only.

Syntax

aws.oe_urlschemesucceed ( string as_urlscheme )

Argument Type

Argument

Description

eon_mobile_awsex

aws

The name of the eon_mobile_awsex object.

string

as_urlscheme

Receives the value of the URL scheme parameter passed by the other PowerServer mobile app or third-party app.

Return value

None.

Functions
of_checkpermissionfornet

Description

Checks if the app in Appeon Workspace has permissions to access the .NET IIS server.

Supported on mobile client only.

Syntax

aws.of_checkpermissionfornet ( string as_workspaceid, string as_appname )

Argument Type

Argument

Description

eon_mobile_awsex

aws

The name of the eon_mobile_awsex object.

string

as_workspaceid

ID of Appeon Workspace.

string

as_appname

Name of the application installed in Appeon Workspace.

Return value

Integer.

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

-2 - Server is not .NET IIS server.

-3 - Failed to get the application name from Appeon Workspace.

-6 - Failed to execute AppeonDotNetComponent.of_ExecInterface.

1 - The app has permissions to access the server.

20 - Appeon Workspace ID does not exist.

10 - Appeon Workspace ID exists, but is disabled.

11 - Appeon Workspace ID and the app is not associated.

30 - Other reasons.

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 PowerServer Web, or there is an error.

of_getappinfo

Description

Gets the information (such as app name, app URL) of the current PowerServer 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 PowerServer mobile application.

Returns empty string if it is called in PowerBuilder or PowerServer 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 PowerServer mobile application.

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

Return value

Integer.

1 - Success.

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

of_getapporientation

Description

Detects if the screen orientation of the PowerServer 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 PowerServer Web, or there is an error.

of_getapprotationlock

Description

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

Supported on mobile client only.

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 PowerServer 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 PowerServer 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.

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 PowerServer 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.

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 PowerServer Web, or there is an error.

of_getdwinputmode

Description

Obtains the display mode of the virtual keyboard on the mobile device when the user taps into the DataWindow text field. If of_setdwinputmode is called, then of_getdwinputmode will obtain the display mode set via of_setdwinputmode. If of_setdwinputmode is not called, then of_getdwinputmode will obtain the display mode setting in Appeon Workspace.

Supported on mobile client only.

Syntax

aws.of_getdwinputmode ( )

Argument Type

Argument

Description

eon_mobile_awsex

aws

The name of the eon_mobile_awsex object.

Return value

Integer.

1 - Keyboard displays when the user taps once in the DataWindow field.

2 - Keyboard displays when the user taps twice in the DataWindow field.

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

See also

of_setdwinputmode

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 PowerServer 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.

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 PowerServer Web, or there is an error.

of_geturlschemeparm

Description

Gets the value of the URL scheme parameter passed by another PowerServer mobile app or a third-party app.

For more about the URL scheme, refer to URL Scheme Name in PowerServer Toolkit User Guide.

Supported on mobile client only.

Syntax

aws.of_geturlschemeparm ( ref string as_urlscheme )

Argument Type

Argument

Description

eon_mobile_awsex

aws

The name of the eon_mobile_awsex object.

ref string

as_urlscheme

Receives the value of the URL scheme parameter passed by the third-party app.

Return value

Integer.

1 - Success.

-1 - It is called in PowerBuilder or PowerServer 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 PowerServer Web, or if there is any error.

Return value

Integer.

1 - Success.

-1 - It is called in PowerBuilder or PowerServer 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.

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 PowerServer 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 PowerServer Web, or there is an error.

of_getworkspaceidappname

Description

Gets the Appeon Workspace ID and the name of the application currently running in Appeon Workspace. The Appeon Workspace ID is based on the device's unique identifier which depends on the device manufacturer, product type, and operating system.

Supported on mobile client only.

Syntax

aws.of_getworkspaceidappname ( )

Argument Type

Argument

Description

eon_mobile_awsex

aws

The name of the eon_mobile_awsex object.

string

as_workspaceid

The Appeon Workspace ID.

string

as_appname

The name of the application currently running in Appeon Workspace.

Return value

Integer

1 - Success.

-1 - It is called in PowerBuilder or PowerServer 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 PowerServer 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 PowerServer Web, or there is an error.

Usage

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

of_register

Description

Registers the object and the event to be bound with the oe_urlschemesucceed event.

Supported on mobile client only.

Syntax

aws.of_register ( powerobject apb_bind, string as_schemeparam )

Argument Type

Argument

Description

eon_mobile_awsex

aws

The name of the eon_mobile_awsex object.

powerobject

apb_bind

The object to be bound with the oe_urlschemesucceed event.

string

as_schemeparam

The event to be bound with the oe_urlschemesucceed event.

Return value

Integer.

1 - Success.

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

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 PowerServer 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 PowerServer 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 PowerServer Web, or there is an error.

of_setapprotationlock

Description

Sets whether to lock the screen orientation of the PowerServer 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 PowerServer mobile application, so it will not rotate when the screen orientation of the device changes.

0 - Unlocks the screen orientation of the PowerServer mobile application.

Return value

Integer.

1 - Success.

-1 - It is called in PowerBuilder or PowerServer 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 PowerServer 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 PowerServer 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 PowerServer Web, or there is an error.

of_setdwinputmode

Description

Sets the display mode of the virtual keyboard on the mobile device when the user taps into the DataWindow text field. You can also set the display mode for all applications installed in the same Appeon Workspace, by going to Appeon Workspace | Settings | General, and setting the Show Keyboard on a Single Tap option. For more information, refer to the section called “Showing keyboard on single tap or double taps” in Appeon Workspace User Guide. The of_setdwinputmode function takes precedence over the setting in Appeon Workspace.

By default, the keyboard pops up when the user taps twice in the field of the DataWindow, or when the user presses the DataWindow field for as long as 1500 milliseconds (you can change this value using of_setlongpressinterval).

Supported on mobile client only.

Syntax

aws.of_setdwinputmode ( integer ai_mode )

Argument Type

Argument

Description

eon_mobile_awsex

aws

The name of the eon_mobile_awsex object.

integer

ai_mode

1 – Keyboard displays when the user taps once on a DataWindow field.

2 – Keyboard displays when the user taps twice on a DataWindow field.

Return value

Integer.

1 - Success.

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

Limitation

When the user is dragging in the DataWindow control, the virtual keyboard may display unexpectedly.

When the virtual keyboard displays after the single tap, the DataWindow text field will not respond to the scroll gesture any more.

See also

of_getdwinputmode

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 PowerServer Web, or there is an error.

of_sethinttext

Description

Sets the hint text for the SingleLineEdit control. The hint text property is not available in PowerBuilder SingleLineEdit control. It is specially designed for the PowerServer mobile application.

Syntax

aws.of_sethinttext ( singlelineedit sle_target, string as_hinttext )

Argument

Description

aws

The name of the eon_mobile_awsex object.

sle_target

The name of the eon_singlelineeditex object.

as_hinttext

The text that will be displayed as hint text in the SingleLineEdit control.

Return value

Integer.

1 - Success.

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

-2 - The as_hinttext argument is null.

of_sethinttextcolor

Description

Sets the color of the hint text for the SingleLineEdit control. The hint text color property is not available in PowerBuilder SingleLineEdit control. It is specially designed for the PowerServer mobile application.

Syntax

aws.of_sethinttextcolor ( singlelineedit sle_target, long al_newcolor )

Argument

Description

aws

The name of the eon_mobile_awsex object.

sle_target

The name of the eon_singlelineeditex object.

al_newcolor

The color of the hint text that will be displayed in the SingleLineEdit control.

Return value

Integer.

1 - Success.

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

-2 - The al_newcolor argument is null.

of_setlongpressinterval

Description

Sets the duration (in milliseconds) for a press before it is recognized as a long press. Once this duration is reached, the keyboard will be brought up to display. By default, the keyboard pops up when the user taps twice in the field of the DataWindow, or when the user presses the DataWindow field for as long as 1500 milliseconds.

Supported on mobile client only.

Syntax

aws.of_setlongpressinterval ( long al_interval )

Argument Type

Argument

Description

eon_mobile_awsex

aws

The name of the eon_mobile_awsex object.

long

al_interval

Sets the duration in milliseconds. If it is set to a value smaller than 500 milliseconds, then 550 milliseconds will be used, because 500 milliseconds is already used as the duration for the DataWindow drag & drop event.

Return value

Long.

1 - Success.

-1 - It is called in PowerBuilder or PowerServer 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 PowerServer 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 PowerServer Web, or there is an error.

of_triggerevent

Description

Triggers the object event bound with the oe_urlschemesucceed event.

Supported on mobile client only.

Syntax

aws.of_triggerevent ( string as_event )

Argument Type

Argument

Description

eon_mobile_awsex

aws

The name of the eon_mobile_awsex object.

string

as_event

The event name bound with oe_urlschemesucceed event.

Return value

None.

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.