Created
July 25, 2012 02:19
-
-
Save realrasengan/3173995 to your computer and use it in GitHub Desktop.
Bitcoin Balance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var self = Ti.UI.createWindow({ | |
backgroundColor:'#000000', | |
exitOnClose:true | |
}); | |
self.addEventListener('android:back', function(e){ | |
self.close(); | |
var activity = Titanium.Android.currentActivity; | |
activity.finish(); | |
}); | |
var Barcode = require("ti.barcode"); // include barcode | |
Barcode.displayedMessage = ''; | |
Barcode.addEventListener('success', function (e) { | |
Ti.Platform.openURL("http://blockexplorer.com/address/"+unescape(e.result).match(/([^\?]*)/)[1].replace("bitcoin:","")); | |
self.close(); | |
var activity = Titanium.Android.currentActivity; | |
activity.finish(); | |
}); | |
Barcode.capture({ | |
animate: false, | |
showCancel: false, | |
showRectangle: true, | |
keepOpen: false, | |
acceptedFormats: [ | |
Barcode.FORMAT_QR_CODE | |
] | |
}); | |
self.add(bitcoin); | |
self.add(scanAgain); | |
self.open(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Barcode Scanner SDK: obtain encoded URL information
How to Read Barcode Image