Capture error object in error callback in a string and not a CaptureErrorCB
object
----------------------------------------------------------------------------------
Key: CB-104
URL: https://issues.apache.org/jira/browse/CB-104
Project: Apache Callback
Issue Type: Bug
Components: Android
Affects Versions: 1.2.0, 1.1.0
Environment: Samsung Galaxy S2
Reporter: Daniel Adrian
While using the Capture API, specifically to capture video, the returned object
within the the error callback is a string with value "Canceled." and not a
CaptureErrorCB with an error code.
This happens when the user cancels the capture using the back button, but could
also happen for other error (with another message).
This is the code in question :
else if (resultCode == Activity.RESULT_CANCELED) {
// If we have partial results send them back to the user
if (results.length() > 0) {
this.success(new PluginResult(PluginResult.Status.OK, results,
"navigator.device.capture._castMediaFile"), this.callbackId);
}
// user canceled the action
else {
this.fail("Canceled.");
}
}
// If something else
else {
// If we have partial results send them back to the user
if (results.length() > 0) {
this.success(new PluginResult(PluginResult.Status.OK, results,
"navigator.device.capture._castMediaFile"), this.callbackId);
}
// something bad happened
else {
this.fail("Did not complete!");
}
}
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira