Offline

Checks and applies the updates of the current application.

eon_offlineex object

Functions
of_applydbupdate

Description

Updates the local database files of the current application.

Supported on mobile client only.

Syntax

offline.of_applydbupdate ( )

Argument Type

Argument

Description

eon_offlineex

offline

The name of the eon_offlineex object.

Return value

Integer.

0 - The DB structure of the current application is the same as that in the server, and no need to update.

1 - Success.

-1 - Failure or it is called in PowerBuilder.

-2 - It is called in Appeon Web and this operation is not supported.

of_checkappeonserver

Description

Detects if Appeon Server exists.

Supported on mobile client only.

Syntax

offline.of_checkappeonserver ( )

Argument Type

Argument

Description

eon_offlineex

offline

The name of the eon_offlineex object.

Return value

Integer.

1 - Appeon Server exists.

-1 - Appeon Server does not exist or there is an error in the checking of the Appeon Server, or it is called in PowerBuilder.

of_applyupdate

Syntax 1

Syntax 2

Description 1

Updates the current application from the server.

Supported on mobile client only.

Syntax 1

offline.of_applyupdate ( boolean ab_showdialog )

Argument Type

Argument

Description

eon_offlineex

offline

The name of the eon_offlineex object.

boolean

ab_showdialog

This argument controls whether to display a dialog box that prompts the end user to restart the app after updated. The prompt message is "After the app is updated, you need to restart the app to make the new version take effect. Please confirm your update." The end user can choose OK to update the app, or choose Cancel to not to update the app.

True - To display the dialog box.

False - Not to display the dialog box.

Return value 1

Integer.

1 - Success.

0 - Latest app and no need to update.

-1 - Failure or it is called in PowerBuilder.

-2 - It is called in Appeon Web and this operation is not supported.

Description 2

Updates the current application from the server according to the return value of of_checkupdate.

Supported on mobile client only.

Syntax 2

offline.of_applyupdate ( )

Argument Type

Argument

Description

eon_offlineex

offline

The name of the eon_offlineex object.

Return value 2

Integer.

1 - Success.

0 - Latest app and no need to update.

-1 - Failure or it is called in PowerBuilder.

-2 - It is called in Appeon Web and this operation is not supported.

Note: The following application configuration information will be synchronized when running the offline mobile application for the first time or when calling the of_applyupdate function.

  • AEM configuration

    1. Application > Local Database

    2. Application > PB Features > INI Files

    3. Application > PB Features > Decimal Precision

    4. Application > Client Features > [codeexamples] > Application Title

    5. Application > Client Features > [codeexamples] > Retina Display (Mobile Only)

    6. Application > Data Transfer > Encoding

    7. Mobile UI Resizing

  • Application configuration

  • Data source

  • Embedded SQL

  • DW SQL

  • Local database files

of_checkupdate

Description

Detects if there is any update for the current application.

Supported on mobile client only.

Syntax

offline.of_checkupdate ( )

Argument Type

Argument

Description

eon_offlineex

offline

The name of the eon_offlineex object.

Return value

Integer.

0 - There is no update.

1 - There is an update only for the application.

2 - There is an update only for the database file.

3 - There are updates for both the database file and the application.

-1 - Failure in the update check or it is called in PowerBuilder.

-2 - It is called in Appeon Web and this operation is not supported.