Deep linking

The RVM permits deep linking to an OpenFin application from anywhere that can invoke a link, such as a browser, email client, or another OpenFin application. The RVM uses a custom protocol handler to invoke the application, if not already running, and to pass context to a specific location within an OpenFin application via a uniform resource identifier (URI).

fins://mydomain.com/path-to-manifest/app.json?$$parameter1=value1&$$parameter2=value2

Note that the RVM passes to the application only URL parameters that are prefixed with two dollar signs ($$). For URL parameters with one or zero dollar signs, the RVM treats them as part of the base URL.

An application needs to handle URL parameters in both of two cases:

  • When the app is first launched, the args object in fin.desktop.main contains the parameters.
  • When the app is invoked when it is already running, the args object on the run-requested application event contains them.
// On application launch, parameters are passed through
fin.desktop.main(function(args) { 
   //args parameter contains deep link context
   console.log(args.parameter1);
})
// If the app is already running, parameters are passed through the 
//“run-requested” event 
app.addEventListener("run-requested", function (event) { 
   if(event.userAppConfigArgs){ 
      //args parameter contains deep link context
      console.log(event.userAppConfigArgs.parameter1); 
   } 
})