how can I return value from execute function in my own created plugin ?

I'm creating my own plugin and The desired output of my plugin is a string and I want to return that string to the client(which is android user App) here are the steps I followed 

1-I've created the javascript API by which a Cordova project may interact with this plugin

2-I've implemented the java file for my plugin and i returned the object like this from the execute function

I'm calling the action to call execute function in a js action when the user click on it 

I want to know how and where to catch the returned value ?

Solution

I figured out the solution, here is the solution :

the execute function will return boolean instead of a pluginResult object and the callbackContext function will send the PluginResult.Status and the value you want to revieve in outsystems which is in this case 'OTP'


Solution