AppInstallOffLine Method (CLIENT)
PLB Web Only, 9.9B
The AppInstallOffLine method adds or removes entries from the 'plbwebaddr.txt' file. This file is located in the mobile device persistent storage path. This method is implemented to allow 'Plbwebcli' client buttons to be configured so they can start 'Plbwebcli' offline user web apps. The method uses the following format:
|
|
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. A CLIENT object.
return
Optional. A Numeric Variable that returns the success or failure of the method.
name
Required. A Character String Variable or string literal that is used for the name\text of the 'Plbwebcli' button that starts the offline user web app.
html
Optional. A Character String Variable or string literal that specifies the file name of a HTML file located in the persistent storage of a mobile device. This HTML file is associated with the 'Plbwebcli' offline button being installed.
Flags Affected: OVER, ZERO
Note the following:
The ZERO flag is always set when the {return} value is zero which indicates that the method execution was successful. The ZERO flag is clear if the {return} value is not zero which indicates that the method execution failed.
The OVER flag is set if the {return} variable is too small to receive the numeric result.
The {html} parameter contains the file name of a HTML file that has been previously downloaded into the persistent storage on a mobile device. The contents of the HTML file need only contain the HTML <body> contents a web page. The <body> and </body> tags are not included in the HTML file data. The HTML file can also include JavaScript <script> routines.
The optional {css} parameter contains the file name of a CSS file that has been previously downloaded into the persistent storage of a mobile device. The CSS file data contains the classes used in support of the user web app.
The optional {js} parameter contains the file name of a JavaScript file that has been previously downloaded into the persistent storage of a mobile device. The JavaScript file data contains the JavaScript routines used to support the offline user web app. There is a special JavaScript function name 'ProgramStart' function that must exist in the JavaScript routines or in the HTML file contents. The 'Plbwebcli' client executes the 'ProgramStart' function to start the execution of the user offline web app.
The optional {flags} parameter is a bit mask value that control behaviors of this
method. The {flags} bit mask values are defined as follows:
|
Value |
Meaning |
|
0 |
Install\configure button with jQuery Mobile support. This is the default. |
|
1 |
Install\configure button without jQuery Mobile support. |
|
2 |
Remove 'Plbwebcli' button with the {name} title. In this case, the {html} parameter is not used. |
The {return} pass\fail values are defined as follows:
|
Value |
Meaning |
|
0 |
The method executed successfully. |
|
1 |
Cordova is not supported |
|
2 |
The method failed and extended error information can be retrieved using the CLIENT 'AppExtendedError' method.. |
Example:
Install\configure a 'Plbwebcli' button that starts the execution of offline web app.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
See Also: CLIENT, Client Methods, Method Syntax
![]() |