MADFINALIF6I17
MADFINALIF6I17
MADFINALIF6I17
EDUCATION
GOVERNMENT POLYTECHNIC MURTIZAPUR
2023-2024
SUBMITTED BY-
1
Maharashtra State
Board of Technical Education
Certificate
This is to certify the following group of students roll …………………………. of 6th
semester of Diploma in Information Technology of institute, Government Polytechnic
Murtizapur (CODE: - 1241) has completed the Micro Project satisfactorily in the
subject – Mobile Application Development (22617) for the Academic year 2023 to 2024 as
prescribed in the Curriculum.
2
INDEX
1 Cover Page 1
2 Certificate 2
3 Index 3
4 Acknowlegement 4
5 Introduction 5
6 Application 6
8 Action Plan 11
9 Coding 12 to 20
10 Output 21
11 Conclusion 22
3
ka
ACKNOWLEDGEMENT
It gives me immense pleasure bringing out this project entitled “QR Code
scanner & generator application in the guidance of Mr. R. R. Bhoge, I would
like to thank my guide for helpful suggestion & numerous discussions at all
stages of this project.
Thanking You……
4
INTRODUCTION :
As a micro project, I have created a QR code application that can both scan and
generate QR codes using the ZXing library in an Android application.
The main goal of this QR code application is to provide a simple and efficient way
for users to scan and generate QR codes. The application features a user-friendly
interface that allows users to easily scan destroy
5
Applications
QR code scanners have a wide range of applications in various industries. For
example, in retail, QR codes can be used to provide product information, enable
mobile payments, or offer discounts or coupons. In healthcare, QR codes can be
used to store patient data, track inventory, or provide instructions for medical
devices.
QR code generators can be used to create QR codes for a variety of purposes. For
example, in marketing, QR codes can be used to promote products or services,
enable social media sharing, or provide links to landing pages.
6
QR CODE SCANNER & GENERATOR
APPLICATION
Aims/Benefits of the Micro-Project
• Convenience: With a QR scanner app on their phone, users can quickly and
easily scan QR codes to access information, without the need for typing in
long URLs or searching for information manually.
1. Mobile Application Development: Creating a mobile app using Android Studio and Zing
library demonstrates the ability to develop mobile applications.
7
2. User Interface Design: Designing a user-friendly interface for the QR scanner and QR
generator app shows the ability to create a visually appealing and user-friendly interface for
mobile applications.
3. CoData Storage and Retrieval: The app uses ZXing library to retrieve and store data,
demonstrating the ability to integrate external libraries and APIs in mobile app development.
Proposed Methodology :
The proposed methodology for creating a simple QR scanner and QR generator app using
Android Studio and Zing library involves the following steps:
1. Requirement Gathering: The first step is to gather requirements for the app, including
what features it should have, what platforms it should support, and what functionality it should
provide.
2. Design: Once the requirements are gathered, the next step is to design the user interface
for the app. This involves creating wireframes and mockups to visualize the app's layout and
user flow.
3. Development: With the design in place, the next step is to begin the development process.
This involves writing the code to implement the app's functionality, including using Zing
library to integrate QR scanning and generation.
4. Testing: After the app is developed, the next step is to test it thoroughly to ensure that it
is free from bugs and performs as expected. This involves running tests on various devices,
platforms, and networks to ensure that the app functions correctly in different scenarios.
RELATIONAL:
The rationale behind developing a simple QR scanner and QR generator app using Android
Studio and Zxing library is to provide users with a convenient way to scan and generate QR
8
codes. QR codes have become increasingly popular in recent years, and they are used in various
domains, including marketing, logistics, and education. With the growing popularity of QR
codes, there is a need for an app that can scan and generate QR codes.
Developing an app for scanning and generating QR codes using Android Studio and Zxing library
offers several advantages, including:
1. Convenience: The app provides users with a convenient way to scan and generate QR codes
using their mobile devices.
2. Efficiency: The app is designed to be efficient and fast, allowing users to scan and generate
QR codes quickly.
3. Cost-Effective: Developing an app for scanning and generating QR codes is cost- effective
compared to purchasing a separate QR code scanner or generator.
4. Customization: Developing an app allows for customization of the user interface, features,
and functionality, providing a unique user experience.
5. Learning Opportunities: Developing an app provides opportunities for learning new skills
related to mobile app development, programming, user interface design, integration,
problemsolving, and project management.
Overall, developing a simple QR scanner and QR generator app using Android Studio and Zxing
library is a rational decision because it offers a convenient, efficient, cost- effective, customizable
solution for scanning and generating QR codes, while also providing opportunities for learning
and skill development.
9
⁰Page 10 of 17
Methodology Followed :
The actual methodology followed for developing a simple QR scanner and QR generator app
using Android Studio and Zxing library involves the following steps:
1. Installing Android Studio: The first step is to install Android Studio, which is an integrated
development environment (IDE) used for developing Android apps.
2. Creating a new project: The second step is to create a new project in Android Studio by
selecting the appropriate settings, including the package name, SDK version, and project type.
3. Adding dependencies: The next step is to add the required dependencies, including the
Zxing library, which is used for scanning and generating QR codes.
4. Designing the user interface: The next step is to design the user interface for the app using
Android's XML layout files. The user interface should be user-friendly and easy to navigate.
5. Writing the code: The next step is to write the code for the app, including the code for
scanning and generating QR codes. The code should be optimized for performance and should
follow best coding practices.
6. Testing the app: The next step is to test the app thoroughly to ensure that it is working as
expected. The app should be tested on various devices and operating systems to ensure
compatibility.
The above steps provide a high-level overview of the actual methodology followed for
developing a simple QR scanner and QR generator app using Android Studio and Zxing
library. However, the actual process can be more detailed and may involve additional steps
depending on the complexity of the app and the project requirement.
10
⁰Page 11 of 17
Action plan
S.NO. Details Of Activity Planned Start Planned Finish Name Of
Date Date Responsible Team
Members
Shivam Khadse
3 Collection of data 17/1/24 25/1/24 Pankaj Gorle
Pratik Throat
Shivam Khadse
4 Preparing Algorithm 28/1/24 4/2/24 Pankaj Gorle
and Flowchart
Pratik Throat
Shivam Khadse
5 Development of 5/2/24 9/2/24 Pankaj Gorle
program
Pratik Throat
Shivam Khadse
6 Development o 12/3/24 18/3/24 Pankaj Gorle
program
Pratik Throat
Shivam Khadse
7 Presentation/Seminar 25/3/24 1/4/24 Pankaj Gorle
Pratik Throat
Shivam Khadse
8 Submission Micro- 2/4/24 6/4/24 Pankaj Gorle
Project
Pratik Throat
Shivam Khadse
11
⁰Page 12 of 17
Resource Required
3 Android Device
Coding :
GenerateQRCodeActivity.java
package com.example.qr_code_generatorscanner;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Point;
import android.hardware.input.InputManager;
import android.os.Bundle;
import android.view.Display;
import android.view.View;
import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.google.android.material.textfield.TextInputEditText;
12
⁰Page 13 of 17
import com.google.zxing.BarcodeFormat;
import com.google.zxing.MultiFormatWriter;
import com.google.zxing.WriterException;
import com.google.zxing.common.BitMatrix;
import com.journeyapps.barcodescanner.BarcodeEncoder;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_generate_qrcode);
qrCodeTextView = findViewById(R.id.frameText);
qrCodeImageView = findViewById(R.id.QRCodeImg);
qrCodeTextInputEditText = findViewById(R.id.inputData);
qrCodeGeneratorButton = findViewById(R.id.QRCodeGeneratorBtn);
qrCodeGeneratorButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String data = qrCodeTextInputEditText.getText().toString().trim();
if(data.isEmpty()){
Toast.makeText(GenerateQRCodeActivity.this, "Please Enter Some Data to
Generate QR Code", Toast.LENGTH_SHORT).show();
}else{
13
⁰Page 14 of 17
// Initialize Bitmap
Bitmap bitmap = encoder.createBitmap(matrix);
manager1.hideSoftInputFromWindow(qrCodeTextInputEditText.getApplicationWindowToken()
,0);
qrCodeTextView.setVisibility(View.GONE);
} catch (WriterException e) {
e.printStackTrace()
14
⁰Page 15 of 17
}
}
}); }}
HomeActivity.java
package com.example.qr_code_generatorscanner;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
generateQRButton = findViewById(R.id.QRCodeGeneratorBtn);
scanQRButton = findViewById(R.id.QRCodeScannerBtn);
generateQRButton.setOnClickListener(new View.OnClickListener() {
@Override
15
⁰Page 16 of 17
scanQRButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(HomeActivity.this, ScanQRCodeActivity.class);
startActivity(intent);
}
}); }}
MainActivity.java
package com.example.qr_code_generatorscanner;
import androidx.annotation.RequiresApi;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.view.WindowManager;
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
16
⁰Page 17 of 17
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManag
er.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_main);
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
Intent intent = new Intent(MainActivity.this, HomeActivity.class);
startActivity(intent);
finish();
}
},2000); }}
ScanQRcodeActivity.java
package com.example.qr_code_generatorscanner;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import android.app.Activity;
import android.content.pm.PackageManager;
17
⁰Page 18 of 17
import android.os.Bundle;
import android.widget.TextView;
import android.widget.Toast;
import eu.livotov.labs.android.camview.ScannerLiveView;
import eu.livotov.labs.android.camview.scanner.decoder.zxing.ZXDecoder;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_scan_qrcode);
scannerLiveView = findViewById(R.id.camView);
scannedTextView = findViewById(R.id.scannedData);
if(checkPermission()){
Toast.makeText(this, "Permission Granted..",Toast.LENGTH_SHORT).show();
}else{
requestPermission();
}
scannerLiveView.setScannerViewEventListener(new
ScannerLiveView.ScannerViewEventListener() {
@Override
public void onScannerStarted(ScannerLiveView scanner) {
18
⁰Page 19 of 17
@Override
public void onScannerStopped(ScannerLiveView scanner) {
Toast.makeText(ScanQRCodeActivity.this, "Scanner Stopped...",
Toast.LENGTH_SHORT).show();
}
@Override
public void onScannerError(Throwable err) {
Toast.makeText(ScanQRCodeActivity.this, "Scanner Error Occurred Please Start
Again...", Toast.LENGTH_SHORT).show();
}
@Override
public void onCodeScanned(String data) {
scannedTextView.setText(data);
}
});
19
⁰Page 20 of 17
@Override
protected void onPause() {
scannerLiveView.stopScanner();
super.onPause();
}
@Override
protected void onResume() {
super.onResume();
ZXDecoder decoder = new ZXDecoder();
decoder.setScanAreaPercent(0.8);
scannerLiveView.setDecoder(decoder);
scannerLiveView.startScanner();
}
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,
@NonNull int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
if(grantResults.length > 0){
20
⁰Page 21 of 17
Output :
21
⁰Page 22 of 17
Conclusion :
The QR code scanner and generator app offers users a convenient and versatile tool for accessing
and sharing information efficiently. By seamlessly scanning QR codes, users can quickly access
websites, product details, and other digital content, enhancing their overall digital experience.
Additionally, the app's QR code generation feature empowers users to create customized codes for
various purposes, such as marketing campaigns, event promotions, and personal branding. Overall,
the app simplifies the process of interacting with QR codes, making it an essential tool for both
personal and professional use in today's digital landscape
22