Detecting how an Application was launched
In OpenFin there are many ways to launch an Application, e.g. you can launch by clicking a shortcut, from the command line or with a fin / fins link. Once the App is up and running the method Application.getInfo can be utilized to determine how it was launched. The info object returned by getInfo will include an property launchMode which can be one of the following:
'fin-protocol' || 'fins-protocol' || 'shortcut' || 'command-line' || 'adapter' || 'other' || a process name (ex: 'openfin.exe')
Example
const app = await fin.Application.getCurrent();
app.getInfo().then(({ launchMode }) => console.log(launchMode)).catch(console.error);
Comments
0 comments
Please sign in to leave a comment.