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) {
}
});
}
}
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 Project
password "Subscribe" works only at the start,on the content inside does not work.Help please
ReplyDelete
DeleteCan be applied at commercial level ?
DeleteCan be applied at commercial level ?
Yes, you can for mini business.
DeleteFor first winrar file use password : Subscribe
Deletefor second time use : 1@Subscribe#Me
second password is not working
DeleteAnd does backend works?
ReplyDeleteEvery patch works Until you didn't miss something during editing.
DeleteWhats the insisde password?
ReplyDeletepassword is not working
ReplyDeleteAdmiring the time and effort you put into your blog and detailed information you offer!.. best shopping sites
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteWordSphere 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
ReplyDeleteWhats the inside password ?
ReplyDeleteplz help
rar file seems to be broken after download ... could you help?
ReplyDeletei doen't run with me
ReplyDeletehi 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
ReplyDeleteMy cart activity is not working it gets crashed when i clik on cart ... Please help me solve it
ReplyDeleteI am not getting the source code
ReplyDeletehow can i download source code of this
ReplyDeletewhere is the source code
ReplyDeletewhere is source code?
DeleteI'm not getting source code of inside
ReplyDeleteFor the people who are not getting second password
ReplyDeleteFor first winrar file use password : Subscribe
for second time use : 1@Subscribe#Me
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
ReplyDeleteThe password is incorrect give me the correct , please
ReplyDeletecan u tell me the packages needed to install this ?
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteI just want you to know that, you just saved my life. Thank you so much. God bless you
ReplyDeletehi sir help me why it is not work
ReplyDeletesir please send android full project
ReplyDeleteAwesome 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
ReplyDeletejigsaw 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.
ReplyDeletei needed the inside password sir
ReplyDeleteHi there to every single one, it’s actually a nice for
ReplyDeleteme to go to see this web site, it contains useful Information.
banarasi dupatta
banarasi silk dupatta