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 in or the deep link contains credentials to login the OMA client.
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 Deep Link Commands.
Configuring OMA Deep Link Commands
All deep link commands 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.
tokenType=bearer&token=XXXXXXXXX: If the deep link is to login OMA using JWT authentication. This will cause OMA to authenticate using this token if OMA is not already logged in before processing the rest of the deep link command.
basic=YYYYYYYY: If the deep link is to login OMA using JWT authentication. This will cause OMA to authenticate using this basic authentication if OMA is not already logged in before processing the rest of the deep link command. YYYYYYYY is the username:password base64 encoded.
userType=XXXXXXXX: If OMA is not logged in, and either basic or token authentication is provided, OMA will attempt to use this user type as part of the login. If no user type is provided, the user will need to select the user type. If the userType=USE_FIRST_USER_TYPE, the first user type in the list at login will be used.
server=SSSSSSSS: On login, if there are multiple servers OMA can connect to, OMA will use server SSSSSSSS or if not provided, OMA will use the last login server.
crewKey=nnn or crewName=CCCC: If provided, this will cause OMA to change the user's associated crew to the crew with the matching key or name.
Example:
nmsoma://mapfocus?lat=40.9254&long=-81.3983&msg=frisvold&uxreturnurl=http://maps.apple.com/?ll=45.123,-93.505