ANDROID APP

The right way to create your individual QR Code and Barcode scanner reader Android App? – full supply code



This video reveals the steps to create your individual QR code (Fast response) and barcode scanner Android App in Android Studio. It makes use of zxing library ‘com.journeyapps:zxing-android-embedded:4.0.2’.

On this video it reveals learn how to create an IntentIntegrator object to scan the codes out of your telephone. The code on this video has been saved quite simple to comply with.

The testing of the App has been executed utilizing an actual telephone as digital camera options aren’t emulated within the emulator. The screenshots of the check outcomes and full challenge supply code is out there on the beneath webpage:

How to create your own QR Code and Barcode scanner reader Android App? – complete source code

For any options, feedback, queries or appreciations we will probably be glad to listen to at: programmerworld1990@gmail.com

A few of the supply code is being pasted beneath:

package deal com.instance.myqrcodebarcodescanner;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;

import android.Manifest;
import android.content material.Intent;
import android.content material.pm.PackageManager;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.google.zxing.integration.android.IntentIntegrator;
import com.google.zxing.integration.android.IntentResult;

public class MainActivity extends AppCompatActivity

personal TextView textView;

@Override
protected void onCreate(Bundle savedInstanceState)
tremendous.onCreate(savedInstanceState);
setContentView(R.format.activity_main);
textView = findViewById(R.id.textView);
ActivityCompat.requestPermissions(this, new String[]Manifest.permission.CAMERA, PackageManager.PERMISSION_GRANTED);

public void ScanButton(View view)
IntentIntegrator intentIntegrator = new IntentIntegrator(this);
intentIntegrator.initiateScan();

@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent information)
IntentResult intentResult = IntentIntegrator.parseActivityResult(requestCode, resultCode, information);
if (intentResult != null)
if (intentResult.getContents() == null)
textView.setText(“Cancelled”);
else
textView.setText(intentResult.getContents());

tremendous.onActivityResult(requestCode, resultCode, information);

/***************************/

apply plugin: ‘com.android.utility’

android
compileSdkVersion 29
buildToolsVersion “29.0.2”
defaultConfig
applicationId “com.instance.myqrcodebarcodescanner”
minSdkVersion 26
targetSdkVersion 29
versionCode 1
versionName “1.0”
testInstrumentationRunner “androidx.check.runner.AndroidJUnitRunner”

buildTypes
launch
minifyEnabled false
proguardFiles getDefaultProguardFile(‘proguard-android-optimize.txt’), ‘proguard-rules.professional’

dependencies
implementation fileTree(dir: ‘libs’, embrace: [‘*.jar’])
implementation ‘androidx.appcompat:appcompat:1.0.2’
implementation ‘androidx.constraintlayout:constraintlayout:1.1.3’
testImplementation ‘junit:junit:4.12’
androidTestImplementation ‘androidx.check.ext:junit:1.1.0’
androidTestImplementation ‘androidx.check.espresso:espresso-core:3.1.1’

implementation ‘com.journeyapps:zxing-android-embedded:4.0.2’

/*********************************/

source