darryncampbell / darryncampbell-cordova-plugin-intent

General purpose intent shim layer for cordova appliations on Android. Handles various techniques for sending and receiving intents.
MIT License
86 stars 130 forks source link

startActivityForResult using done process after call back data is undefined #108

Closed snaveenpandi closed 4 years ago

snaveenpandi commented 4 years ago

startActivityForResult using payment (indian payment upi) is done,after return our app im getting status report in onsucess.data but now im not geting data key in that response

my response is { extras: resultcode:0, requestcode:1 }

here data key is missing now

this.webIntent.startActivityForResult((options)).then(onSuccess => { console.log("payment 1", options); if (onSuccess.extras.requestCode == 1) { console.log('Picked contact: ' + onSuccess.data); // im getting error data is undefined } console.log("payment onSuccess", onSuccess); }, onError => { console.log("payment onError", onError); });

darryncampbell commented 4 years ago

You might want to take a look at https://github.com/darryncampbell/darryncampbell-cordova-plugin-intent/blob/master/src/android/IntentShim.java#L607 and debug in Android Studio, this is the line of code that converts the intent from onActivityResult into a JSON object. Perhaps something is going wrong in that conversion.