...
There are a number of differences between using the Profound Mobile client in standard vs offline mode as described below:
- A Javascript JavaScript program must be created to run on the app.
- The Javascript JavaScript program must use a Rich Display screen saved as a JSON file.
- A "Sync" web service is needed to sync the collected data back to the server.
- Javascript JavaScript and JSON files must be stored in the IFS at the Profound UI instance folders userdata/js folder
- For a standard instance installation the path is is /www/Profounduiprofoundui/htdocs/profoundui/userdata/js/
- The Javascript JavaScript program may have any functionality you wish but must include the following methods:
run(displayData, connection, callback) - Called when connection name is tapped and should include the application code.
sync(connection, callback) - Called when the Sync icon is tapped and should contain the code to contact the server web service and send and/or receive data.
isSyncNeeded() - Should contain code to determine if there is data that needs to be synced back to the server.
Program naming:
The default names for the Javascript JavaScript and JSON files are puimobile_default.js and puimobile_default.json.
To create multiple programs, you will need to use the Parameter field which then becomes part of the file names.
For example: If you enter Orders in the Parameter field during connection setup, you would need the files file names to be puimobile_orders.js and puimobile_orders.json.
...
Examples:
More details and sample code can be found in our Sample projects:
There are two offline mobile examples available. Both examples use the same Javascript program and example files.
The only difference between the two examples is that one uses a Profound.js web service and the other uses a Profoudn UI Universal Display program for the web service
Universal Display version: https://github.com/ProfoundLogic/offline-mobile-universal-displayproject:
Profound.js version: https://github.com/ProfoundLogic/offline-mobile-sample