Scan Barcode And qrcode Programmatically In Android Studio


Step 2: Updating build.gradle(Module:app) file


Download 139.41 Kb.
bet5/7
Sana16.04.2023
Hajmi139.41 Kb.
#1358704
1   2   3   4   5   6   7

Step 2: Updating build.gradle(Module:app) file


add following code into dependencies{} 
compile 'me.dm7.barcodescanner:zxing:1.9'
Here we are using ZXing library. You can also use ZBar library.

Step 3: Updating AndroidManifest.xml file


add camera permission between …. tag.

Step 4: Updating activity_main.xml file:


Copy following code into android_main.xml file:

xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.exampledemo.parsaniahardik.scanzxingdemonuts.MainActivity">

Download 139.41 Kb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling