Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

using released 0.2.0 version

  • Loading branch information...
commit f7871dd8ca4fc3626468a4608170216294bac40a 1 parent d29ccd0
@m00sey authored
View
20 assets/www/phonegap-nfc-0.2.0.js
@@ -168,5 +168,23 @@ var nfc = {
}
// return an array of bytes
return re;
+ },
+
+ bytesToHexString: function (bytes) {
+ var bytesAsHexString = "";
+ for (var i = 0; i < bytes.length; i++) {
+ if(bytes[i] >= 0) {
+ dec = bytes[i];
+ } else {
+ dec = 256 + bytes[i];
+ }
+ hexstring = dec.toString(16);
+ // zero padding
+ if(hexstring.length == 1) {
+ hexstring = "0" + hexstring;
+ }
+ bytesAsHexString += hexstring;
+ }
+ return bytesAsHexString;
}
-};
+};
View
BIN  lib/phonegap-nfc-0.2.0.jar
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.