是否可以开箱即用zxing嵌入式ContinuousCaptureActivity?

时间:2016-12-20 15:55:49

标签: java android zxing

我在我的OnCreate的{​​{1}}中调用了我的Activity中的以下方法:

Activity

前两个public void addListenerOnCameraButton() { cameraButton = (Button) findViewById(R.id.btn_camera); cameraButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Toast.makeText(Tracking.this, "Kamera", Toast.LENGTH_SHORT).show(); Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(takePictureIntent, 1); } }); scannerButton = (Button) findViewById(R.id.btn_scanner); scannerButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { IntentIntegrator integrator = new IntentIntegrator(Tracking.this); integrator.setDesiredBarcodeFormats(IntentIntegrator.ALL_CODE_TYPES); integrator.setBeepEnabled(false); integrator.initiateScan(); } }); scanContButton = (Button) findViewById(R.id.btn_scanner_cont); scanContButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(Tracking.this, ContinuousCaptureActivity.class); startActivity(intent); } }); } 无关紧要。第三个是。我想点击我的按钮,让它开始连续扫描活动。

我认为这样可行。

我已将.setOnClickListener添加到<activity android:name="com.journeyapps.barcodescanner.ContinuousCaptureActivity"/>但不起作用。

我在ManifestUnresolved class ContinuousCaptureActivity都收到错误Manifest

我认为Activity不能被使用并且更像某个人需要重建自己的例子,我错了吗?

修改:作为参考,我使用了ContinuousCaptureActivity zxing-embedded,可在此处找到:https://github.com/journeyapps/zxing-android-embedded/blob/master/sample/src/main/java/example/zxing/ContinuousCaptureActivity.java

我在journeyapps

中实施了常规CaptureActivity
Manifest

0 个答案:

没有答案