You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/03/20 16:49:14 UTC

[30/40] js commit: [android] Add support for binary strings to the bridge

[android] Add support for binary strings to the bridge


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/fed89510
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/fed89510
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/fed89510

Branch: refs/heads/cb2227
Commit: fed89510ec982871df783049c80131bccf449711
Parents: 1d87907
Author: Andrew Grieve <ag...@chromium.org>
Authored: Fri Mar 15 15:56:25 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Fri Mar 15 16:42:47 2013 -0400

----------------------------------------------------------------------
 lib/android/exec.js |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/fed89510/lib/android/exec.js
----------------------------------------------------------------------
diff --git a/lib/android/exec.js b/lib/android/exec.js
index 90ea186..af2715b 100644
--- a/lib/android/exec.js
+++ b/lib/android/exec.js
@@ -200,6 +200,8 @@ function processMessage(message) {
                     arraybuffer[i] = bytes.charCodeAt(i);
                 }
                 payload = arraybuffer.buffer;
+            } else if (payloadKind == 'S') {
+                payload = window.atob(message.slice(nextSpaceIdx + 2));
             } else {
                 payload = JSON.parse(message.slice(nextSpaceIdx + 1));
             }