Ok lets say there are 3 different applications which are using zxing lib on the phone. Whenever I want to open zxing with my own application android asks me whether to complete action using app 1 or app 2 or my own app. How do I force it to run only through my app without any dialog? Is there any chance to do it?
EDIT
In Additional to CommonsWare, you can do that if you want to handle barcode result on the other activity.
step 1: jump to method called handleDecode in Capture Activity. Add these lines after handleDecodeInternally(rawResult, resultHandler, barcode);
Intent intent = new Intent(getIntent().getAction());
intent.putExtra("SCAN_RESULT", rawResult.getText());
setResult(RESULT_OK,intent);
finish();
step 2: Do whatever want to do on the other activity's onActivityResult event.
PS: Thanks again to CommonsWare.
See Question&Answers more detail:os