Cordova Onactivityresult Is Called Immediately After Startactivityforresult With Result_canceled
In the code below, when onActivityResult is called immediately with RESULT_CANCELED. As suggested in other answers, I have added setActivityResultCallback just before startActivit
Solution 1:
I faced the same issue in one of my cordova application. I could not find the source of error but I resolved it by creating new project and installing all plugins again. It worked.
Solution 2:
You should not use the setActivityResultCallback()
method!
If you check in cordova source, you will discover that setActivityResultCallback
is an internal method with the purpose of calling onActivityResult
with the RESULT_CANCELED
parameter when a previous activity is still unfinished.
setActivityResultCallback
should be a private method in Cordova code to avoid such bugs.
Post a Comment for "Cordova Onactivityresult Is Called Immediately After Startactivityforresult With Result_canceled"