GitHub user kalliste opened a pull request:

    https://github.com/apache/cordova-android/pull/358

    CB-12424: (android) Fix encoding of multipart messages.

    
    Currently when I try to assemble a multipart message cordova-android 
assembles the data in NativeToJsMessageQueue.java as [""] but if I call 
pMessageLoopResponse(callbackContext, 3, 5) it should generate [3, 5]
    
        private void pMessageLoopResponse(final CallbackContext ctx, int iMsg, 
int iTag) {
            List<PluginResult> results = new ArrayList<PluginResult>();
            results.add(0, new PluginResult(PluginResult.Status.OK, iMsg));
            results.add(1, new PluginResult(PluginResult.Status.OK, iTag));
            PluginResult result = new PluginResult(PluginResult.Status.OK, 
results);
            result.setKeepCallback(true);
            ctx.sendPluginResult(result);
        }
    
    We split off encodeMessageAsJsMessage as its own method to support 
multipart messages including ones containing array buffer, binary string, or 
other multipart messages.
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kalliste/cordova-android master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-android/pull/358.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #358
    
----
commit 2dd9acf2fa0c179269002e369cb0d7df598741eb
Author: Josh Jackson <jjack...@kallisteconsulting.com>
Date:   2017-02-03T21:20:37Z

    Fix encoding of multipart messages.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to