You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.
Describe the bug
If an action triggers another action which is of type $agent.request and $return.success is returned, the original action's success is never executed.
So the yay success alert of action1 is never executed:
This is true of all agent actions not just $agent.request
The problem is
In JasonAgentAction the caller event object is ignored, and never passed through to the JasonAgentService, and so all the JasonHelper.next(...) calls are made with empty event objects.
The text was updated successfully, but these errors were encountered:
Upon some testing it seems that At least Android needs a little time. Around 100 ms before responding to an action so the system can process it.
Example from $media.permissions
// We need at least 100 ms to call the success with the result// If not then it will be omitted since it will too fast // for the system to process.newHandler(Looper.getMainLooper()).postDelayed(newRunnable() {
@Overridepublicvoidrun() {
try {
JSONObjectret = newJSONObject();
ret.put("files", ContextCompat.checkSelfPermission(context, Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED);
ret.put("camera", ContextCompat.checkSelfPermission(context, Manifest.permission.CAMERA) == PackageManager.PERMISSION_GRANTED);
JasonHelper.next("success", action, ret, event, context);
} catch (Exceptione) {
Log.d("Warning", e.getStackTrace()[0].getMethodName() + " : " + e.toString());
}
}
}, 100); // Millisecond 1000 = 1 sec
Describe the bug
If an action triggers another action which is of type
$agent.request
and$return.success
is returned, the original action's success is never executed.So the yay success alert of
action1
is never executed:This is true of all agent actions not just
$agent.request
The problem is
In
JasonAgentAction
the caller event object is ignored, and never passed through to theJasonAgentService
, and so all theJasonHelper.next(...)
calls are made with empty event objects.The text was updated successfully, but these errors were encountered: