Tutorial: interop.handleFiredIntentForContext

interop.handleFiredIntentForContext

Responsible for resolving an Intent based on a specific Context. Must be overridden.

Whenever InteropClient.fireIntentForContext is called this function will fire. The contextForIntent argument gives you access to the context that will be resolved to an intent. It also can optionally contain any metadata relevant to resolving it, like a specific app the client wants the context to be handled by. The clientIdentity is the identity of the client that made the call.

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

fin.Platform.init({
    interopOverride: async (InteropBroker) => {
        class Override extends InteropBroker {
            async handleFiredIntentForContext(contextForIntent, clientIdentity) {
                // Your code goes here.
            }
        }
        return new Override();
    }
});