Anyone who kno开发者_JAVA技巧ws a good way to generate/create a barcode from a String in Android?
You can use the Google Charts API, a simple call to the following url with your text in chl
parameter returns an image with the QRcode.
http://chart.apis.google.com/chart?cht=qr&chs=150x150&chl=give+me+a+beer
If you want to encode on the device instead of calling to a URL, indeed you want ZXing. Look at what it does for the Android client Barcode Scanner in EncodeActivity.
精彩评论