Web App Client Command Line
9.9
The Sunbelt Plb Web App is named 'plbwebcli'. The PWS (PL/B Web Server) supports the the Android Sunbelt Plb Web App as a client. The 'plbwebcli' App cannot access any PWS server versions older than 9.9. The Android 'plbwebcli' App can be downloaded using the Google 'Play Store' on your Android mobile device.
Note:
1. The Android 'plbwebcli' App has been implemented to execute on an Android OS version 4.0 or newer.
2. The Android 'plbwebcli' App implementation uses Cordova and PhoneGap technologies. See the following links for more information:
https://cordova.apache.org/docs/en/latest/guide/overview/
http://phonegap.com
3. The Android 'plbwebcli' is implemented to allow access\logon to a PL/B Web Server (PWS) where PL/B programs can be executed with all UI occurring in the App viewport.
4. New PWS keywords have been implemented to support the Sunbelt 'plbwebcli' App as follows:
PLBWEB_APP_IMAGE_URL={url}
This keyword generates a remote URL on a 'URLSRC' property for a PICTURE or ICON when running under a Cordova application client and there is no protocol header detected.
Example:
PLBWEB_APP_IMAGE_URL=http://192.168.1.7:8081/
PLBWEB_APP_IMAGE_SSL_URL={sslurl}
This keyword generates a remote URL on a 'URLSRC' property for a PICTURE or ICON when running under a Cordova application client and there is no protocol header detected.
Example:
PLBWEB_APP_IMAGE_SSL_URL=https://www.mypws.com:8082/
PLBWEB_UPLOADS={directoryname}[/]
This keyword specifies the directory under the 'http_root' directory to place any files sent by the 'AppUpload' method. If this keyword is not used, the default directory under 'http_root' is named 'uploads'.
The RUNTIME object method named 'GetDir' returns the string value of this keyword when a Type value of 6 specified.
PLBWEB_APP_SUPPORT={on|off}
By default the PL/B Web Server supports PL/B Web App clients. This keyword can be set to OFF to prevent 'Plbwebcli' App access to the PWS server.
5. The Plbwebcli App is implemented to support SSL certificates. However, self-signed SSL certificates are not supported.
6. The PL/B PICT/ICON objects have been changed to support the Sunbelt 'plbwebcli' App as follows:
Use the '!' as the leading character in the 'URLSRC' property string value to get\use Web application files from the 'local application area' on the mobile device.
7. The PL/B CLIENT object method 'GetState' has been modified to include a new {mask} bit value of 0x2 described as follows:
|
Mask Value |
Definition |
|
0x2 |
This state flag indicates that Corodva/Phonegap Support is used for the client. |
8. The PL/B CLIENT object has been modified to support new methods which are implemented when using the 'plbwebcli' App client. If these methods are executed using a normal Client Browser,
the methods are ignored. The use of the 'plbwebcli' methods requires knowledge of JSON (JavaScript Object Notation) used by these methods. Note the following:
All methods are Cordova/PhoneGap based operations.
All method names start with 'App' prefix.
All 'AppXxx' methods return one of the following error codes:
|
Value |
Error |
|
0 |
AppErrorNone |
|
1 |
AppErrorNoCordovaSupport |
|
2 |
AppErrorWithExtendedInfo |
|
3 |
AppErrorWithNoExtendedInfo |
|
4 |
AppErrorUnknownInfoType |
|
5 |
AppErrorNoInfoReturned |
|
6 |
AppErrorBadCaptureType |
|
7 |
AppErrorBadMediaType |
|
8 |
AppErrorUnknownServic |
|
9 |
AppErrorUnknownPushAction |
|
10 |
AppErrorUnknownGeoType |
If a string is returned for a method, any error code is returned in a json string as follows:
{ "plbError": num }
For any methods that require a Cordova 'plugin', the operation specifics are described in the Cordova documentation of the 'plugin' being used.
Some method operations occur asynchronously on a mobile device after a CLIENT method has returned to the PLB program executing the method. For these methods, an event must be registered using the EVENTREG instruction for the CLIENT object to allow the mobile device result to be passed to the PLB program once it has been completed by the mobile device user. In these scenarios, the method result is passed using the PLB event ARG1 parameter as a JSON string. See methods for details.
These methods for the CLIENT object can only be used for the PL/B Cordova\PhoneGap web App. Here is the list of the 'plbwebcli' App methods:
|
Method |
Event Required |
|
AppCapture |
103 |
|
AppDialog |
107 |
|
AppDownload |
105 |
|
AppExtendedError |
|
|
AppFindContact |
108 |
|
AppGetInfo |
|
|
AppGetPicture |
102 and 118 |
|
AppGeoLocation |
115 |
|
AppMedia |
109 |
|
AppPickContact |
101 |
|
AppScanBarCode |
119 |
|
AppUpload |
104 |
|
AppVibrate |
|
9. Definitions used for PL/B Web Client:
See Also: Browser Client URL
![]() |