Tutorial: interop.handleFiredIntent

interop.handleFiredIntent

Responsible for launching of applications that can handle a given intent, and delegation of intents to those applications. Must be overridden.

To make this call FDC3-Compliant it would need to return an IntentResolution.

interface IntentResolution {
  source: TargetApp;
  /**
  * @deprecated not assignable from intent listeners
  */
  data?: object;
  version: string;
}

More information on the IntentResolution type can be found in the FDC3 documentation.

Example

// override call so we set intent target and create view that will handle it
fin.Platform.init({
    interopOverride: async (InteropBroker) => {
        class Override extends InteropBroker {
            async handleFiredIntent(intent) {
                super.setIntentTarget(intent, { uuid: 'platform-uuid', name: 'intent-view' });
                const platform = fin.Platform.getCurrentSync();
                const win = fin.Window.wrapSync({ name: 'foo', uuid: 'platform-uuid' });
                const createdView = await platform.createView({ url: 'http://openfin.co', name: 'intent-view' }, win.identity);
            }
        }
        return new Override();
    }
});