Deep Links Using an OMA PWA Wrapper
When OMA is Wrapped using the PWA Wrapper, the wrapper will capture deep link calls and process them in the wrapper or pass them to OMA. OMA will not respond to most deep links unless OMA is already logged on.
The deep link schema is defined in the wrapper and defaults to nmsoma://. For example, if a browser or application on the same device as OMA is logged in on makes a URL request to: nmsoma://mapfocus?lat=40.9253&long=-81.3981, OMA will be brought to the foreground, the map page will appear, and the map will be focused on the provided lat/long location.
The Wrapper does have a few internal deep link functions it responds directly:
nmsoma://wrapper/clearCache: This will cause the Wrapper to clear the cache of the internal WebView.
nmsoma://wrapper/relaunch: This will cause the Wrapper relaunch the OMA application in the WebView with the ?runInBrowser=true parameter.
nmsoma://wrapper/restart: This will cause the Wrapper relaunch the OMA application in the WebView with the ?runFromWrapper=true parameter.
Otherwise all other deep links will be passed to OMA to resolve in the oma-main.js:: handleOpenURL function and are described in Configuring OMA Bridge and Wrapper Deep Link Commands.
Configuring OMA Bridge and Wrapper Deep Link Commands
OMA will need to be configured to process /oma/ commands in the oma-main.js:: handleOpenURL function. The following /oma/ commands are included in the OMA template code as examples. If using the HTTP bridge, the calls are proceeded by https://localhost:9595/oma/<command>. If using the wrapper deep links, the calls will be proceeded by nmsoma://.
All of the commands also support these parameters:
uxreturnurl: If provided, will place an icon in the main OMA header and will use this value as a deep link URL to call when the icon is clicked. Once the icon is clicked, it will disappear.
example:
nmsoma://mapfocus?lat=40.9254&long=-81.3983&msg=frisvold&uxreturnurl=http://maps.apple.com/?ll=45.123,-93.505