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.callMethod
calls a native mobile API with an identifier and method/function name. It allows the optional passing of arguments to the method. callMethod
returns a promise that resolve or rejects depending on the success or failure of calling the native mobile API.
Custom modules and methods can be created with Q2's Mobile SDK.
Type
tecton.actions.callMethod(identifier: string, methodName: string, data?: IDict<any>): Promise<any>
Example
tecton.actions.callMethod('com.example.q2.module', 'callCustomMethod', {"exampleKey": 1234}).then((response) => {
//method call was successful
})
.catch((error) => {
//method not available or could not be called
});
String identifier for the mobile module you are accessing methods on.
Method name you are calling on the mobile module.
Object to be passed in as an argument to the method function provided.
{ "exampleKey": "exampleValue" }