Video of the day

Video Example

Blog Archive

Powered by Blogger.

Translate Page Any Language

Follow Us

Our

Follow Us

We want to make contribution to the world by producing finest and smartest better!

Android Studio Project Online Shopping

 

Android Online Shopping Project  Source code


Android E-commerce Source Code and Project

Use this project for online shopping. E-commerce application is an Android base project. It allows the user to easily select and buy their products from the app. This project runs you will need Android Studio. So before you run the project make sure that you have Android Studio on your computer.


About the Project

This whole project has only one concept, which is to provide a wide range of products to reach their customers. Customers can select Categories of products they want to buy. Also, they can schedule their shipping details. they have to provide the proper shipping details. Here, when they run the project they can see the welcome screen of this project. In order to run the project, first, install Android Studio. Then import the project from the studio’s homepage. Your project set up will automatically start. All the Gradle build files will automatically install inside your project root directory. Run the project and set up your virtual device and run the emulator. The project will start and there you can see different lists and options from this commerce site. Here, in this project, you can select different types of products like clothes, cars, mobiles, music and many more items. Then from those options, they can select any type of product you want to buy. See this source code.


Project Features for User

Add to cart
buy product
Add product


Project Features for Admin

Add product
Confirm Order
Shipment Detail.


Main Activity

import android.app.ProgressDialog;
import android.content.Intent;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

import com.example.productapp.Model.Users;
import com.example.productapp.Prevalent.Prevalent;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;

import io.paperdb.Paper;

public class MainActivity extends AppCompatActivity {
    private Button joinNowButton, loginButton;
    private ProgressDialog loadingBar;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        joinNowButton = (Button) findViewById(R.id.main_join_now_btn);
        loginButton = (Button) findViewById(R.id.main_login_btn);
        loadingBar = new ProgressDialog(this);
        Paper.init(this);

        loginButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(MainActivity.this, LoginActivity.class);
                startActivity(intent);
            }
        });
        joinNowButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view)
            {
                Intent intent = new Intent(MainActivity.this, RegisterActivity.class);
                startActivity(intent);
            }
        });
        String UserPhoneKey = Paper.book().read(Prevalent.UserPhoneKey);
        String UserPasswordKey = Paper.book().read(Prevalent.UserPasswordKey);
        if (UserPhoneKey != "" && UserPasswordKey != "")
        {
            if (!TextUtils.isEmpty(UserPhoneKey)  &&  !TextUtils.isEmpty(UserPasswordKey))
            {
                AllowAccess(UserPhoneKey, UserPasswordKey);

                loadingBar.setTitle("Already Logged in");
                loadingBar.setMessage("Please wait.....");
                loadingBar.setCanceledOnTouchOutside(false);
                loadingBar.show();
            }
        }
    }
    private void AllowAccess(final String phone, final String password)
    {
        final DatabaseReference RootRef;
        RootRef = FirebaseDatabase.getInstance().getReference();
        RootRef.addListenerForSingleValueEvent(new ValueEventListener() {
            @Override
            public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
                if (dataSnapshot.child("Users").child(phone).exists()){

                    Users usersData = dataSnapshot.child("Users").child(phone).getValue(Users.class);
                    if (usersData.getPhone().equals(phone))
                    {
                        if (usersData.getPassword().equals(password))
                        {
                            Toast.makeText(MainActivity.this, "Please wait, you are already logged in...", Toast.LENGTH_SHORT).show();
                            loadingBar.dismiss();

                            Intent intent = new Intent(MainActivity.this, HomeActivity.class);
                            Prevalent.currentOnlineUser = usersData;
                            startActivity(intent);

                        }
                        else {
                            loadingBar.dismiss();
                            Toast.makeText(MainActivity.this,"Password is incorrect",Toast.LENGTH_SHORT).show();
                        }
                    }
                }
                else {
                    Toast.makeText(MainActivity.this, "Account with this " + phone + " number do not exists.", Toast.LENGTH_SHORT).show();
                    loadingBar.dismiss();
                }
            }

            @Override
            public void onCancelled(DatabaseError databaseError) {

            }
        });
    }
}


Online Shopping Project Graphical User Interface


                          



Main Activity 


<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/welcome"
    tools:context=".MainActivity">
    <ImageView
        android:id="@+id/app_logo"
        android:layout_width="300dp"
        android:layout_height="100dp"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="60dp"
        android:src="@drawable/applogo"
        />
    <TextView
        android:id="@+id/app_slogan"
        android:layout_width="248dp"
        android:layout_height="wrap_content"
        android:layout_alignParentEnd="true"
        android:layout_alignParentTop="true"
        android:layout_marginEnd="80dp"
        android:layout_marginTop="142dp"
        android:text="Find, Discover, Choose and Buy anything online."
        android:textAlignment="center"
        android:textColor="@color/colorPrimary"
        android:textSize="30sp"
        android:textStyle="bold|italic"
        />
    <Button
        android:id="@+id/main_login_btn"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentStart="true"
        android:layout_marginBottom="10dp"
        android:layout_marginLeft="15dp"
        android:layout_marginRight="15dp"
        android:background="@drawable/buttons"
        android:padding="20dp"
        android:textAllCaps="false"
        android:textSize="18sp"
        android:text="Already have an Account? Login"
        android:textColor="@android:color/white"
        />

    <Button
        android:id="@+id/main_join_now_btn"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_above="@+id/main_login_btn"
        android:layout_marginBottom="5dp"
        android:layout_marginLeft="15dp"
        android:layout_marginRight="15dp"
        android:background="@drawable/input_design"
        android:padding="20dp"
        android:textAllCaps="false"
        android:textSize="18sp"
        android:text="Join Now"
        android:textColor="@android:color/white"
        />

</RelativeLayout>

Online Shopping App Project 

Password: Subscribe

Project Link: Online Shopping



 Online Shopping Project

Online Shopping Project


37 on: "Android Studio Project Online Shopping "
  1. password "Subscribe" works only at the start,on the content inside does not work.Help please

    ReplyDelete
    Replies

    1. Can be applied at commercial level ?

      Delete

    2. Can be applied at commercial level ?

      Delete
    3. For first winrar file use password : Subscribe
      for second time use : 1@Subscribe#Me

      Delete
    4. second password is not working

      Delete
  2. Replies
    1. Every patch works Until you didn't miss something during editing.

      Delete
  3. Admiring the time and effort you put into your blog and detailed information you offer!.. best shopping sites

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. WordSphere is a leading WordPress configuration and development company in USA. We are experienced in creating custom sites in one of the world's prominent web platform. wordsphere.com

    ReplyDelete
  6. rar file seems to be broken after download ... could you help?

    ReplyDelete
  7. hi this is mohsin my app not create signed app and running app login and admin log app is close and again open reply me what can do

    ReplyDelete
  8. My cart activity is not working it gets crashed when i clik on cart ... Please help me solve it

    ReplyDelete
  9. I am not getting the source code

    ReplyDelete
  10. how can i download source code of this

    ReplyDelete
  11. I'm not getting source code of inside

    ReplyDelete
  12. For the people who are not getting second password

    For first winrar file use password : Subscribe
    for second time use : 1@Subscribe#Me

    ReplyDelete
  13. Come on There is no File in rar file how it was Compressed, if you Don't want to share Code then No need to Waste others Time

    ReplyDelete
  14. This comment has been removed by the author.

    ReplyDelete
  15. The password is incorrect give me the correct , please

    ReplyDelete
  16. can u tell me the packages needed to install this ?

    ReplyDelete
  17. This comment has been removed by the author.

    ReplyDelete
  18. This comment has been removed by the author.

    ReplyDelete
  19. I just want you to know that, you just saved my life. Thank you so much. God bless you

    ReplyDelete
  20. hi sir help me why it is not work

    ReplyDelete
  21. sir please send android full project

    ReplyDelete
  22. Awesome blog. I enjoyed reading your articles. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work! shedstore promo

    ReplyDelete
  23. jigsaw puzzle shop melbourne Wow, cool post. I'd like to write like this too - taking time and real hard work to make a great article... but I put things off too much and never seem to get started. Thanks though.

    ReplyDelete
  24. i needed the inside password sir

    ReplyDelete
  25. Hi there to every single one, it’s actually a nice for
    me to go to see this web site, it contains useful Information.
    banarasi dupatta
    banarasi silk dupatta

    ReplyDelete

Your Comment is processing to approved