You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Pavel Nikotin (JIRA)" <ji...@apache.org> on 2017/02/03 12:14:51 UTC
[jira] [Commented] (CB-12420) NativeToJsMessageQueue breaks the
order of callbacks
[ https://issues.apache.org/jira/browse/CB-12420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15851410#comment-15851410 ]
Pavel Nikotin commented on CB-12420:
------------------------------------
I found solution: If don't dequeue in popAndEncodeAsJs function and just return this, than everything forks fine;
public String popAndEncodeAsJs() {
return "window.setTimeout(function(){cordova.require(\"cordova/exec\").pollOnce();},0);";
}
And I had to add androidExec.pollOnce = pollOnce; to cordova.js
> NativeToJsMessageQueue breaks the order of callbacks
> ----------------------------------------------------
>
> Key: CB-12420
> URL: https://issues.apache.org/jira/browse/CB-12420
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android
> Affects Versions: 6.4.0
> Environment: Android 4.4.2, Android 5.1.1
> Reporter: Pavel Nikotin
> Priority: Minor
>
> I'm streaming data with cordova-plugin-chrome-apps-sockets-tcp plugin.
> I receive data in javascript not in the same order as tcp plugin put to sendPluginResult.
> I see that popAndEncode and popAndEncodeAsJs called from different places of cordova sources. But only popAndEncodeAsJs method adds window.setTimeout(...,0); so I think It breaks order.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org