Reputation: 1029
Whenever I send
callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, 0));
on my onClick function. I receive this in my logcat
W/CordovaPlugin: Attempted to send a second callback for ID: DemoPlugin1910499679
Result was: 0
I can receive response from
callbackContext.success();
in my JS successCallback function. But I can't receive callback from .sendPluginResult()
Upvotes: 0
Views: 1195
Reputation: 1029
It looks like callbackContext.sendPluginResult()
can't work together with callbackContext.success()
.
I remove callbackContext.success()
and left only callbackContext.sendPluginResult()
. Only then I was able to get the result at my JS callback function.
Upvotes: 1