Deploying with the Profound UI Mobile Client
Configure Profound.js Application for the Mobile Client
To configure a Profound.js application to run with the Mobile Client, see the following documentation page: https://profoundlogicsupport.atlassian.net/wiki/x/VQDOCQ
The Profound UI mobile client is an app that is created and maintained by Profound Logic, starting with Profound UI Version 4, Fix Pack 6.0. It is intended to be a "generic app" that can run any rich display screen on any server. The Mobile Client app is free and may be installed on Android from Google Play, or on iOS devices from the Apple App Store.
While the Mobile Client is a free app, you will need to have Profound UI Mobile licensing in order to configure the Mobile Client to run your programs.
These are the steps required to use the Profound UI Mobile Client:
Develop a rich display program that will be run from the mobile client.
Use the Visual Designer to configure Profound UI to run your rich display when a mobile client connects.
Install the Profound UI mobile client on each device that wishes to use it.
Point the Profound UI mobile client at your IBM i server.
Develop a Rich Display Program to Be Run from the Mobile Client
Use the visual designer to create a rich display program (or convert green-screen DDS to a rich display) the same way for mobile devices that you would for desktop PCs. We recommend that you give some thought to using larger fonts and buttons on a mobile device so that it's easy to read the text or touch the buttons on small screens.
Use the Visual Designer to Configure Profound UI Mobile
This is done on the Launch menu of the Visual designer. Click Launch and then Configure Profound UI Mobile.
Set the Profound UI server to run the Rich Display program of your choice:
Program: The name of the IBM i program (RPG program that uses a rich display) that the mobile client should run.
Library: The name of the IBM i library that contains the program.
Require Sign-On: If checked, the user running the mobile client will be asked for an IBM i user id and password before they can run your program. If unchecked, the user will not have to sign in, and the program will run as the IBM-supplied QTMHHTP1 user profile.
Configuring Profound UI Mobile When The Visual Designer Is Not Available
The settings for the initial mobile program (shown above) are stored in a physical file named PUIMOBP. If you can't use the dialog in the Visual Designer (for example, if running Profound UI on a production partition where the Visual Designer is not available) you can set the initial mobile program by updating the PUIMOBP file directly. Here are the fields in the file:
KEY = This field is for future expansion. For now, it should always be set to 1.
LIBRARY = The library of your initial mobile program in all uppercase letters.
PROGRAM = The object name of your initial mobile program in all uppercase letters.
SIGNON = Set this to capital Y if signon is required, or capital N if it is not.
Install the Profound UI Mobile Client
The Profound UI mobile client is a free app available in either Google Play or the Apple App Store. It is named 'Profound UI'. Search the app store for the app, and install it exactly the same way you would install any other mobile app.
Point the Profound UI mobile client at your IBM i server
Once the Profound UI app is installed, run it and you will be presented with a screen like this:
At this point, you have two options for defining connections to servers.
Option 1: Manually define a connection
Tap the "New Connection" button to create a connection to your IBM i server. You will be presented with a screen like this:
Name: This is the name of the mobile connection that will show up on the connections screen (the first screen you see when the mobile app is opened). Choose a name that will be easy for your users to recognize as making a connection to your IBM i program.
Server: This is the host name or IP address that will be used to connect to your IBM i server.
Port: This should be the port number that you installed Profound UI on – 8080 is the default value, but when you install Profound UI on your IBM i server, you can choose another port number if desired. Make sure this matches the number you used when installing the IBM i server side of Profound UI.
SSL: This lets you turn on SSL to keep your connection secured. In order to use SSL, you must also configure your IBM i server to accept SSL connections.
Parameter: This allows you to define a parameter (as a 250A parameter) that you can pass to your initial mobile program.
Offline mode: Setting this option to 'On' will allow you to run your applications without having a connection to a server. You can run your applications offline, store any necessary data locally, and simply sync the collected data with the server at a later time. This option is available with version 2.5.0 of the Mobile Client app.
Once you've entered your settings, click "Save" to save them. Once you've done that, when you open the Profound UI mobile app, you will be able to select your server from the list, and it will connect and run the program that was configured in the Visual Designer.
Option 2: Import a predefined set of connections
The Profound UI mobile client has the ability to import a list of connections from a server, to save you the time of manually entering them. For this to work, a JSON file containing the appropriate data needs to exist on the server, at IFS location /www/YOUR-INSTANCE/htdocs/profoundui/userdata/js/mobile_config.json
.
To import connections, tap the "Import Connections" button on the connections screen. A screen like this will appear:
Server: This is the host name or IP address that will be used to connect to your IBM i server.
Port: This should be the port number that you installed Profound UI on – 8080 is the default value, but when you install Profound UI on your IBM i server, you can choose another port number if desired. Make sure this matches the number you used when installing the IBM i server side of Profound UI.
Once you've entered the settings, tap the "Import" button. The mobile client will connect to the server and import the predefined connection definitions, then you will be returned to the connections screen, with the imported connections displayed:
You will now be able to select your server from the list, and it will connect and run the program that was configured in the Visual Designer.
Configuring a predefined list of connections on the server
The connection information that can be imported by the mobile client exists as data in a JSON file. The file must be named mobile_config.json
and placed in IFS directory /www/YOUR-INSTANCE/htdocs/profoundui/userdata/js/
. It should contain, as JSON properties, the same items used when manually defining a connection. Below is the import file used by the above screenshot:
[
{
"name": "Acme, Inc.",
"host": "www.your-ibmi.com",
"port": "8080",
"ssl": false,
"parm": "",
"offline": false
},
{
"name": "XYZ Company",
"host": "www.their-ibmi.com",
"port": "8080",
"ssl": false,
"parm": "",
"offline": false
}
]
Setting Up Multiple Applications in the Mobile Client
By default, the Mobile Client will only allow you to set up one initial mobile program per Profound UI instance. Due to security reasons, the Mobile Client does not allow you to specify a program name when setting up a connection in the client itself. However, you can have more than one mobile application that's started from the Mobile Client's menu. In order to accomplish this, you can use the 'Parameter' option when configuring your application in the client. For example, if you wanted to set up two applications in your Mobile Client (both on the same port), you could create a CL program that accepts parameters and then calls a certain program based on the parameter that is sent. You would then set up the CL program as the initial mobile program for the Mobile Client (as described earlier on this page). Your CL program could look something like this:
PGM PARM(&OPT)
DCL VAR(&OPT) TYPE(*CHAR) LEN(20)
IF COND(&OPT *EQ 'Prog1') THEN(DO)
CALL PGM(Program1)
ENDDO
IF COND(&OPT *EQ 'Prog2') THEN(DO)
CALL PGM(Program2)
ENDDO
ENDPGM
This program will accept a parameter and will call the respective program when that parameter is passed. In this case, parameter 'Prog1' will call Program1 and parameter 'Prog2' will call Program2. When you set up these applications in the client, you would configure them like so:
Afterwards, you should see both the Program1 application and the Program2 application listed on the Mobile Client's menu. If you choose the Program1 application from the menu, it should then run the program (Program1 in this case) that is called when entering the 'Prog1' parameter. If you choose the Program2 application, it will then run the Program2 program (because of the 'Prog2' parameter).