我目前在我的應用程序中使用Zxing庫。例如,掃描一本書的條形碼後,如何從掃描結果中獲取圖像,說明等內容。使用zxing時獲取掃描結果?
@Override
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
switch(requestCode) {
case IntentIntegrator.REQUEST_CODE:
if (resultCode == RESULT_OK) {
IntentResult scanResult =
IntentIntegrator.parseActivityResult(requestCode, resultCode, intent);
} else if (resultCode == RESULT_CANCELED) {
showDialog("failed", "You messed up");
}
}
}
感謝您的幫助
請查看這裏我的回答,希望這有助於 http://stackoverflow.com/a/30627814/2904625 – user2904625 2015-06-03 18:33:14