Giter Club home page Giter Club logo

shopping-android-app's Introduction

Shopping Android App

An e-commerce android application written in Kotlin where users can sell and buy products.

Overview

The application contains list of products such as shoes, slippers on which user can click to view its details and then, add them to cart. User can like and dislike the product as well. Also, User can sell products, if he/she signed up as a Seller. Some other features are as following:

  • Login / Signup with OTP Verification.
  • Recyclerview with variable span size to show products.
  • Search Bar and filtering
  • Product detail screen with image carousel and custom Radio Buttons.
  • Add/Edit Product for Sellers
  • See all orders placed.
  • Increase/Decrease quantity of product in cart.
  • Place Order.
  • Modify status of order for Seller.
  • Add/Edit Address
  • Tested using Espresso. Written unit, instrumentation and UI tests.

Some Screenshots

Splash Screen Application Home Product Detail
Signup Login OTP Verification
Shopping Cart Address Selection Payment Method Order Success
Add Product All Orders Order Detail Sign Out

Project Setup

Clone and install

Clone this repository and import into Android Studio

git clone https://github.com/i-vishi/shopping-android-app.git

Configuration

  • The project requires Firebase. So follow the steps given here (Add Firebase to Android Project) to add firebase to your android project.
  • Download the firebase config file google-services.json
  • Move the config file to (app) module of the project.
  • Also, add Cloud Firestore for storing users, products, orders and addresses data. Follow instructions here (Add Cloud Firestore to your app) to add Cloud Firestore to your app.
  • There need to be two collections - users for Users data and products for Products Data.
  • This project also, requires OTP based authentication. So, you just need to enable Phone Number sign-in in your firebase project. Follow instructions here (Enable Phone Number sign-in) to enable Phone Number sign-in.
  • Do not forget to enable app verification for your firebase project. Follow instructions here (Enable app verification) to enable app verification. Add both SHA-1 and SHA-256 fingerprints.

Tried everything but still not able to explore the app due to OTP errors? Don't worry, you can by-pass the OTP screen and explore the app.

  • Go to app/src/main/java/com/vishalgaur/shoppingapp/Utils.kt file.
  • Change the return value for function shouldBypassOTPValidation() to true.
  • You are good to go now. Just run the app and explore.
  • And take your time to setup the OTP verification. ๐Ÿ˜‰

Star History

Star History Chart

Built With

  • Kotlin
  • Firebase
  • Room
  • Material
  • Glide

Made with ๐Ÿ’™ by Vishal Gaur

shopping-android-app's People

Contributors

i-vishi avatar vishal-testbook avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

shopping-android-app's Issues

Can't sign up

tried to sign up with egp phone number it said invalid phone number how can i change the regex to egp !!

The project doesn't appear to build properly

The build appears to fail. I see two separate build.gradle files (one at the root and another in the app folder). 'gradle tasks' doesn't list any available tasks for building it as an android project. Can you publish the instructions for building the project?

Not Able to register

I am not able to login to the app while register to app it is saying some error occured.

App crashes on Signup page

When adding the user details on sign up page, the app is getting crashed with following error below:
'2022-02-06 20:23:04.600 7268-7268/com.vishalgaur.shoppingapp E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.vishalgaur.shoppingapp, PID: 7268
com.google.firebase.firestore.FirebaseFirestoreException: Failed to get document because the client is offline.
at com.google.firebase.firestore.DocumentReference.lambda$getViaSnapshotListener$1(DocumentReference.java:331)
at com.google.firebase.firestore.DocumentReference$$Lambda$2.onEvent(Unknown Source:8)
at com.google.firebase.firestore.DocumentReference.lambda$addSnapshotListenerInternal$2(DocumentReference.java:504)
at com.google.firebase.firestore.DocumentReference$$Lambda$3.onEvent(Unknown Source:6)
at com.google.firebase.firestore.core.AsyncEventListener.lambda$onEvent$0(AsyncEventListener.java:42)
at com.google.firebase.firestore.core.AsyncEventListener$$Lambda$1.run(Unknown Source:6)
at com.google.firebase.firestore.util.Executors$$Lambda$1.execute(Unknown Source:0)
at com.google.firebase.firestore.core.AsyncEventListener.onEvent(AsyncEventListener.java:39)
at com.google.firebase.firestore.core.QueryListener.raiseInitialEvent(QueryListener.java:176)
at com.google.firebase.firestore.core.QueryListener.onOnlineStateChanged(QueryListener.java:116)
at com.google.firebase.firestore.core.EventManager.handleOnlineStateChange(EventManager.java:178)
at com.google.firebase.firestore.core.SyncEngine.handleOnlineStateChange(SyncEngine.java:368)
at com.google.firebase.firestore.core.MemoryComponentProvider$RemoteStoreCallback.handleOnlineStateChange(MemoryComponentProvider.java:114)
at com.google.firebase.firestore.remote.RemoteStore$$Lambda$1.handleOnlineStateChange(Unknown Source:2)
at com.google.firebase.firestore.remote.OnlineStateTracker.setAndBroadcastState(OnlineStateTracker.java:176)
at com.google.firebase.firestore.remote.OnlineStateTracker.handleWatchStreamFailure(OnlineStateTracker.java:149)
at com.google.firebase.firestore.remote.RemoteStore.handleWatchStreamClose(RemoteStore.java:481)
at com.google.firebase.firestore.remote.RemoteStore.access$200(RemoteStore.java:53)
at com.google.firebase.firestore.remote.RemoteStore$1.onClose(RemoteStore.java:181)
at com.google.firebase.firestore.remote.AbstractStream.close(AbstractStream.java:344)
at com.google.firebase.firestore.remote.AbstractStream.handleServerClose(AbstractStream.java:398)
at com.google.firebase.firestore.remote.AbstractStream$StreamObserver.lambda$onClose$3(AbstractStream.java:151)
at com.google.firebase.firestore.remote.AbstractStream$StreamObserver$$Lambda$4.run(Unknown Source:4)
at com.google.firebase.firestore.remote.AbstractStream$CloseGuardedRunner.run(AbstractStream.java:67)
at com.google.firebase.firestore.remote.AbstractStream$StreamObserver.onClose(AbstractStream.java:137)
at com.google.firebase.firestore.remote.FirestoreChannel$1.onClose(FirestoreChannel.java:136)
at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:413)
at io.grpc.internal.ClientCallImpl.access$500(ClientCallImpl.java:66)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:742)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:721)
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor$DelayedStartFactory.run(AsyncQueue.java:229)
at java.lang.Thread.run(Thread.java:923)'

2 New issues

  1. Warning: The 'kotlin-android-extensions' Gradle plugin is deprecated.
  2. On trying New app Signup activity "Some Error Occurred" is showing and cant go in OTP activity.
    Issue 2 is related to AuthRepository first possible error
    i.e. override suspend fun checkEmailAndMobile

catch (e: Exception) {
makeErrToast("Some Error Occurred", context)
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.