callMethod

Updated:

Allows access to native mobile APIs via Tecton.

callMethod is only supported inside the Q2 mobile banking app. It is not available in the mobile browser or desktop browser.

Description

callMethod calls a native mobile API with an identifier and method/function name. It allows optional arguments to be passed to the method. callMethod returns a promise that resolves or rejects depending on whether the native mobile API call succeeds or fails. Custom modules and methods can be created with Q2's Mobile SDK.

Signature

tecton.actions.callMethod(identifier: string, methodName: string, data: Record<string, any>): Promise<any>;

Usage

Call a custom method on a native mobile module.

tecton.actions.callMethod('com.example.q2.module', 'callCustomMethod', {"exampleKey": 1234}).then((response) => {
    // Method call was successful. Handle the response data.
}).catch((error) => {
    // Method not available or could not be called. Handle the error.
});

Parameters

identifier
methodName
data

Release Notes

Tecton
1.15.0

Platform Support

iOS
Android