android: zxing barcode scan successful but not returning from activity

后端 未结 5 545
悲哀的现实
悲哀的现实 2021-01-04 06:23

I am successfully using zxing to scan codes, by calling the installed barcode reader\'s intent, but when it beeps and indicates a good scan I expect the zxing activity would

5条回答
  •  有刺的猬
    2021-01-04 06:49

    Add finishActivity(requestCode); at the end of onActivityResult() method.

    Try this: Replace your first 2 lines in onTouch with the below code. It seems the issue is while scanning codes other than QR. Please remove the scan filter and check once.

    Intent intent = new Intent("com.google.zxing.client.android.SCAN"); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);

提交回复
热议问题