我有一个二维扫描仪应用程序。我想得到二维码(图像)扫描后二维码。我确实用zxing扫描二维码。
我想得到二维码(img),它不会拍照。
public class okutx extends AppCompatActivity implements View.OnClickListener{
private static int SPLASH_TIME_OUT = 4000;
CardView qrcard,bilgix,linkac,paylas;
String intentResultx;
TextView sonuc;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_okutx);
qrcard = findViewById(R.id.qrimg);
sonuc = findViewById(R.id.sonuc);
IntentIntegrator intentIntegrator = new IntentIntegrator(
okutx.this
);
intentIntegrator.setBeepEnabled(true);
intentIntegrator.setOrientationLocked(true);
intentIntegrator.setCaptureActivity(Capture.class);
intentIntegrator.initiateScan();
rippleBackground.stopRippleAnimation();
rippleBackground.setVisibility(View.INVISIBLE);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
IntentResult intentResult = IntentIntegrator.parseActivityResult(
requestCode,resultCode,data
);
if (intentResult.getContents() != null){
intentResultx = intentResult.getContents();
sonuc.setText(intentResultx);
}
}
[![It will be here here][1]][1]
会是这样的
暂无答案!
目前还没有任何答案,快来回答吧!