Call:
Intent intent = new Intent("com.google.zxing.client.android.SCAN");
intent.putExtra("SCAN_MODE", "ONE_D_MODE");
startActivityForResult(intent, 0);
Reception:
public void onActivityResult(int requestCode, int resultCode, Intent intent){
if (requestCode == 0){
if (resultCode == Activity.RESULT_OK) {
String contents = intent.getStringExtra("SCAN_RESULT");
}
else if (resultCode == Activity.RESULT_CANCELED){
Toast.makeText(getActivity(), "Scan unsuccessful", Toast.LENGTH_SHORT).show();
}
}
}
Here it works perfectly!