Category : qr-code

I want to display the button after I scan the QR code and click to switch Activity. But when I click on it, I will restart the app continuously, and then I get an error. surfaceView=(SurfaceView)findViewById(R.id.surfaceView); barcodeDetector = new BarcodeDetector.Builder(this).setBarcodeFormats(Barcode.QR_CODE).build(); cameraSource=new CameraSource.Builder(this,barcodeDetector).setRequestedPreviewSize(300,300).setAutoFocusEnabled(true).build();surfaceView.getHolder().addCallback(new SurfaceHolder.Callback(){ @Override public void surfaceCreated(@NonNull SurfaceHolder holder) { if(ActivityCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) return; ..

Read more

I am developing a flutter app to read QR Codes. I am using qr_code_scanner: ^0.3.5 library. Below is my code. import ‘dart:io’; import ‘package:flutter/material.dart’; import ‘package:google_fonts/google_fonts.dart’; import ‘package:qr_code_scanner/qr_code_scanner.dart’; class ScanQRCodeScreen extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, appBar: AppBar( title: Text("Scan QR Code"), ), body: _ScanQRCodeUI()); } } class _ScanQRCodeUI ..

Read more