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:

 

  1. All methods are Cordova/PhoneGap based operations.

  2. All method names start with 'App' prefix.

  3. All 'AppXxx' methods return one of the following error codes:

  4.  

    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 }

     

    1. For any methods that require a Cordova 'plugin', the operation specifics are described in the Cordova documentation of the 'plugin' being used.

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

    3. 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:

    4.  

      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:

 

PLBWEBCLI - Sunbelt Web Application
Plbwebcli is a Web application that can be downloaded to mobile devices. It can be used to access the Sunbelt PL/B Web Server (PWS) and executed PL/B programs.
Cordova
Apache Cordova is an open-source mobile development framework. It allows you to use standard web technologies HTML5, CSS3, and JavaScript for cross-platform development.
 
See the following link for more information: https://cordova.apache.org/docs/en/latest/guide/overview/
PhoneGap
From the team behind Apache Cordova, the Adobe PhoneGap framework is an open source distribution of Cordova providing the advantage of technology created by a diverse team of pros along with a robust developer community plus access to the PhoneGap toolset, so you can get to mobile faster.
 
See the following link for more information: http://phonegap.com
Local Application Area
Persistent and private data storage where the Web application files and directories are stored on a mobile device.
 
See the following link for a detail description of files residing on a device: https://www.npmjs.com/package/cordova-plugin-file
 
For Example:
 
"cdvfile://localhost/persistent|temporary/path/to/file can be used for platform-independent file paths.
cdvfile paths are supported by core plugins - for example you can download an mp3 file to cdvfile-path via cordova-plugin-file-transfer and play it via cordova-plugin-media."
 
"cdvfile://localhost/persistent/Bill1.jpg"
 
"cdvfile://localhost/temporary/Bill1.jpg"

 

 

See Also: Browser Client URL



PL/B Web Server The PL/B Web Client Apps Web App Client User Offline Mode