Grocery Shopping Application
Grocery Shopping Application
Grocery Shopping Application
Mobile Application
Project Report
BS (CS)-2015
Submitted by:
Anbreen Jahan
Juwairiah Saleem
Mahwish Naseem
Naveera Jamil
3-May-2018
ABSTRACT
An online Grocery Store permits a customer to submit online orders for items and/or services
from a store that serves both walk-in customers and online customers. The online Grocery Store
system presents an online display of all the items they want to sell. This application helps
customers to choose their daily needs and add products to their shopping cart. Customers provide
their complete detail of address and contact and they get their chosen products in their home.
This application saves lots of time of customers.
2
Project Report: Grocery Shopping
TABLE OF CONTENTS
ABSTRACT................................................................................................................................................2
INTRODUCTION.......................................................................................................................................3
SYSTEM ANALYSIS.................................................................................................................................3
PROJECT SCOPE:..................................................................................................................................3
FEATURES.............................................................................................................................................3
SYSTEM DESIGN......................................................................................................................................4
DATA DICTIONARY:.............................................................................................................................4
Sign Up:.......................................................................................................................................4
Log In:.........................................................................................................................................4
Category:.....................................................................................................................................4
Product:.......................................................................................................................................5
Cart Details:.................................................................................................................................5
Order............................................................................................................................................5
IMPLEMENTATION..................................................................................................................................6
DESCRIPTION CODE...........................................................................................................................6
SNIPPETS...........................................................................................................................................6
SCREEN SHOTS................................................................................................................................9
CONTRIBUTIONS...................................................................................................................................12
CONCLUSION.........................................................................................................................................12
FUTURE WORK......................................................................................................................................12
REFERENCES..........................................................................................................................................13
3
Project Report: Grocery Shopping
INTRODUCTION
A grocery shopping is an android application where users can purchase and order groceries
online. The system is developed with a user-friendly and attractive GUI. It delivers a wide range
of groceries available online. Users have to first login into the system to view the groceries and
add them into their cart. The system functionality of products and orders is stored on server side
in a Firebase. The android app is for client usage. It consists of client side scripting for placing
orders by connecting to the server side firebase.
4
Project Report: Grocery Shopping
SYSTEM ANALYSIS
PROJECT SCOPE:
This product has great future scope. This project also provides security with the use of Login-id
and Password, so that any unauthorized users cannot use your account. The only Authorized that
will have proper access authority can access the software. Small scale shopkeeper can enhance
their area. Buyer registers themselves and access. Multiple products available at one place to
one shop (Grocery Application. All the types of products available to buyer like dairy products,
vegetables etc.
FEATURES
User details once login will be saved in the database for further use.
User will select categories.
User will select product listed in each category and add to the cart.
User will be fill personal details e.g Name, Address, Number for home delivery. Payment
will be cash on delivery.
5
Project Report: Grocery Shopping
SYSTEM DESIGN
DATA DICTIONARY:
Sign Up:
Log In:
Category:
6
Project Report: Grocery Shopping
Product:
Cart Details:
Order:
Field name Data type size Constraints Description
Order ID varchar 10 Primarykey Order ID
User ID varchar 10 Foreign key User ID
Address varchar 30 Not null Address
Amount int 6 Not null Amount
IMPLEMENTATION
7
Project Report: Grocery Shopping
CODE DESCRIPTION
SNIPPETS
Cart Adapter.java
TextDrawable drawable = TextDrawable.builder()
.buildRound(""+listData.get(position).getQuantity(), Color.RED);
holder.img_cart_count.setImageDrawable(drawable);
holder.txt_cart_name.setText(listData.get(position).getProductName());
Cart.java
private void showAlertDialog() {
edtAddress.setLayoutParams(lp);
alertDialog.setView(edtAddress);
alertDialog.setIcon(R.drawable.ic_shopping_cart_black_24dp);
new Database(getBaseContext()).cleanCart();
Toast.makeText(Cart.this, "Thankyou,Your Order has been Placed",
Toast.LENGTH_SHORT).show();
finish();
}
});
Home.java
8
Project Report: Grocery Shopping
viewHolder.txtMenuName.setText(model.getName());
Picasso.with(getBaseContext()).load(model.getImage())
.into(viewHolder.imageView);
foodList.putExtra("CategoryId",adapter.getRef(position).getKey());
startActivity(foodList);
}
});
}
};
recycler_menu.setAdapter(adapter);
}
SignIn.java
final FirebaseDatabase database=FirebaseDatabase.getInstance();
final DatabaseReferencetable_user=database.getReference("User");
btnSignIn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
@Override
public void onDataChange(DataSnapshotdataSnapshot) {
if (dataSnapshot.child(edtPhone.getText().toString()).exists()) {
mDialog.dismiss();
User user =
dataSnapshot.child(edtPhone.getText().toString()).getValue(User.class);
user.setPhone(edtPhone.getText().toString());
if (user.getpassword().equals(edtPassword.getText().toString())) {
Toast.makeText(SignIn.this, "Sign in successfully", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(SignIn.this, "sign in failed", Toast.LENGTH_SHORT).show();
}
}
else {
mDialog.dismiss();
Toast.makeText(SignIn.this,"user not exist in
9
Project Report: Grocery Shopping
database",Toast.LENGTH_SHORT).show();
}
}
SignUp.java
final FirebaseDatabase database = FirebaseDatabase.getInstance();
final DatabaseReferencetable_user = database.getReference("User");
btnSignUp.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
final ProgressDialogmDialog=new ProgressDialog(SignUp.this);
mDialog.setMessage("please waiting.....");
mDialog.show();
table_user.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshotdataSnapshot) {
if(dataSnapshot.child(edtPhone.getText().toString()).exists()){
mDialog.dismiss();
Toast.makeText(SignUp.this, "Phone Number Already
reigister",Toast.LENGTH_SHORT).show();
}
else
{
mDialog.dismiss();
User user = new
User(edtName.getText().toString(),edtPassword.getText().toString());
table_user.child(edtPhone.getText().toString()).setValue(user);
Toast.makeText(SignUp.this, "SignUP Successfully",Toast.LENGTH_SHORT).show();
finish();
}
}
SCREEN SHOTS
10
Project Report: Grocery Shopping
11
Project Report: Grocery Shopping
12
Project Report: Grocery Shopping
CONTRIBUTIONS
13
Project Report: Grocery Shopping
CONCLUSION
Online shopping is the best way to purchase any item but be careful because there
may be some fake products on different sites
Only purchase those items which can be recognized easily that item is fake or not
or choose according rating of buyers.
But not to worry, on my site you will get all items genuine and trusty, just check
once here before buy anywhere.
FUTURE WORK
14
Project Report: Grocery Shopping
REFERENCES
https://www.youtube.com/watch?v=nlQTN7vkc0c&t=1140s
http://nevonprojects.com/grocery-shopping-android/
https://www.slideshare.net/AmitaJain7/grocery-app-aj
https://projectsgeek.com/2016/05/grocery-shopping-android-project.html
https://www.slideshare.net/kmshakya/online-shopping-full-project-presentation-20-slides
15