Login and Signup using Firebase Realtime Database in Android Studio | Store Data

Sdílet
Vložit
  • čas přidán 11. 06. 2024
  • Welcome to Android Knowledge!
    In this video, I have share how to create login and signup in android studio using firebase realtime database. When the user will click on sign up button then the details will be saved in the firebase realtime database. When user will login then it will check the same credentials with the firebase database and if it matches then it will go to the home screen.
    Stepwise Video:
    1. Login and Signup using Firebase Realtime Database in Android Studio:
    • Login and Signup using...
    2. How to Retrieve Data from Firebase Database and Display in Profile Activity in Android Studio:
    • How to Retrieve Data f...
    3. How to Update Data in Firebase Realtime Database in Android Studio, Edit Profile:
    • How to Update Data in ...
    It's difficult to understand the code without a voiceover so for that you can refer to our website where you will find the source code as well the detailed explanations.
    Join our Telegram Group:
    t.me/androidknowledge
    Instagram:
    / android_knowledge
    My Best Laptop for Android Development:
    amzn.to/3wVfgnE
    My Laptop SSD for Fast Android Studio Experience:
    amzn.to/40qvoLo
    My Laptop Stand with Cooling Fans - Avoid Heating Due to Android Studio:
    amzn.to/3RxeGpV
    Source Code:
    androidknowledge.com/login-si...
    GitHub:
    github.com/android-knowledge/...
    If you have any queries or errors, please feel free to comment below :-)
    Please subscribe to my channel 😊👍
    Chapters:
    0:00 - Intro
    0:11 - Create New Project
    0:30 - Firebase
    2:04 - Pre-requisites
    5:42 - activity_signup.xml
    10:32 - activity_login.xml
    12:00 - activity_main.xml
    12:30 - HelperClass.java
    13:35 - SignupActivity.java
    17:15 - LoginActivity.java
    23:56 - Output
    Note: Some parts are blurred due to policy violation.
    Keywords:
    login and signup in android studio using firebase realtime database
    login and signup using firebase in android studio
    login and signup using firebase database
    login page in android studio
    login page in firebase database
    how to create firebase database
    firebase authentication android studio,firebase android studio tutorial,login with firebase android studio,firebase login signup,firebase login,firebase sign up,firebase signup,register with firebase android,firebase authentication,firebase auth,firebase tutorial,firebase new user,firebase auth tutorial,firebase authentication tutorial,firebase forgot password,email authentication firebase android,firebase create new user,firebase
    Login and SignUp using Firebase in Android Studio 2022 | Source Code
    android knowledge
    Android Knowledge
    login signup using firebase android,login and register firebase android studio,login and signup page using firebase,android firebase login and registration,login firebase,firebase authentication,email login firebase,android firebase tutorial,android firebase auth,android firebase database tutorial,firebase auth tutorial,firebase authentication tutorial,firebase sign up,login signup,android firebase realtime database tutorial,firebase tutorial,firebase auth
    how to use firebase in android studio
    how to connect firebase to android studio
    how to use firebase database in android studio
    how to connect firebase database in android studio
    how to connect to firebase in android studio
    firebase android studio
    login with firebase android studio
    firebase android studio tutorial
    login page firebase android studio
    firebase in android studio
    signup page in android studio
    login page in android studio
    Hashtags:
    #android #login #androidstudio #firebase
    Disclaimer:
    We are a participant in the Amazon Associates Program, an affiliate marketing program designed to provide a means for us to earn fees when you click on a product link and make a purchase with no extra cost to you.
    All rights reserved by Android Knowledge ©
  • Věda a technologie

Komentáře • 91

  • @android_knowledge
    @android_knowledge  Před rokem +6

    Please, change:
    1. reference.child(name).setValue(helperClass); to reference.child(username).setValue(helperClass); in SignupActivity at 16:00
    2. if(!Objects.equals(passwordFromDB, userPassword)) to if (passwordFromDB.equals(userPassword)) in LoginActivity at 21:27
    Refer updated source code:
    androidknowledge.com/login-signup-android-studio-firebase-realtime/

    • @resaerpay
      @resaerpay Před 11 měsíci

      Hi there are many problem, first when symbol is used in user name app crashes and if you don't input anything whole data base delets

    • @sadness9438
      @sadness9438 Před 26 dny

      I also have same problem here

  • @ginnidhiman
    @ginnidhiman Před 8 měsíci

    bro is literally living legend

  • @mayureshpatil6265
    @mayureshpatil6265 Před 7 měsíci

    Excellent!....It woks fab.🤞

  • @maikonjipa
    @maikonjipa Před rokem

    Em um vídeo anterior seu deixei uma mensagem a respeito de algo similar a este tutorial, porem aqui voce utiliza somente uma pagina de cadastro, no meu caso seriam 4 paginas de cadastro onde cada pagina faz referencia a um tipo de dado (Dados Pessoais, Dados Bancários, Dados de Veiculo. etc...). Como no seu vídeo é somente uma pagina, ainda não ficou claro de como eu poderia fazer isto em varia paginas trazendo todos os dados armazenando os no "HelperClass", para depois subir todos de uma vez para o RealTime Database.

  • @frank3606
    @frank3606 Před 6 měsíci +2

    Hi am facing an error ... when logging in it gets stuck on the login page. Also the account i have created does not reflect on the database

  • @madhurivaghasana2820
    @madhurivaghasana2820 Před rokem

    Thank You for Sharing such a useful tutorial.

  • @faizanalimian9348
    @faizanalimian9348 Před 11 měsíci

    there is a problem with your sign up code as u can keep the spaces blank and it would still say you have signed up successfully and more over it completely wipes out the firebase database and all the users stored in it so any solution on that

  • @shinobi4076
    @shinobi4076 Před 11 měsíci

    Hi I'm getting a User does not exist error although my code matches yours in the given updated source code. My guess is the snapshot in the login class is returning null. What could be the solution? thanks

  • @abyanhafiizh-3065
    @abyanhafiizh-3065 Před rokem

    thank you, i love you so much

  • @sun-qj8mv
    @sun-qj8mv Před měsícem

    Hello, do you have videos about a complete admin login using firebase & java?

  • @goosa9999
    @goosa9999 Před měsícem

    Te quiero eres el mejor es el único vídeo que funciona

  • @naishalmodi5064
    @naishalmodi5064 Před rokem +1

    hii
    i try this app but data is not save in firebase
    i written same code also app launching but data is not save in firebase so plese fix it this problem

  • @novayoutube2937
    @novayoutube2937 Před rokem +1

    Thank you for making this topic video😊. Could you please create some more videos related to kotlin?

    • @android_knowledge
      @android_knowledge  Před rokem +1

      Yes, sure :-)
      Keep checking our android kotlin playlist:
      czcams.com/play/PLQ_Ai1O7sMV2_qzi0ra-eL4EX-vN3W2QW.html

  • @gufraanshaikh3798
    @gufraanshaikh3798 Před rokem +1

    Outstanding topic💥

  • @zarashaikh5640
    @zarashaikh5640 Před rokem +1

    Creativity++ 😍

  • @faizaali8009
    @faizaali8009 Před rokem

    Thankyou soo much....

  • @fsp4999
    @fsp4999 Před 10 měsíci

    What's is the architecture are you using in this project?

  • @fnk6386
    @fnk6386 Před 5 měsíci +1

    Hello, can you do a video on how to use firebase authentication and realtime database at the sametime

  • @mrdila4353
    @mrdila4353 Před 5 měsíci

    Thank you ❤

  • @JoshuaG
    @JoshuaG Před rokem +2

    Thanks for this video, it helps my thesis.
    By the way , will this actually work once i have the app on my phone ? not an emulator.

  • @jacurry2620
    @jacurry2620 Před 7 měsíci

    Can I ask? when Im logging in the password does not validate and just go login even without matching the registered password. How I fix this to validate first before login

  • @manofsteel6173
    @manofsteel6173 Před 7 měsíci

    Thanks for beautiful ui

  • @anjachi7750
    @anjachi7750 Před rokem +1

    I noticed that you have another video that's also about Login and Sign Up in Firebase. Is it different from what you taught here, and if it is, what is the difference?
    Love the theme of your videos btw I love purple and white combo too!!

    • @android_knowledge
      @android_knowledge  Před rokem +1

      Thank you! 💜
      In this video, we have used realtime database and in the previous video we have used authentication for login signup.
      I hope, it's clear :-)

    • @anjachi7750
      @anjachi7750 Před rokem

      ​@@android_knowledge Ohhh is it not possible to use the realtime database and authentication at the same time?

    • @android_knowledge
      @android_knowledge  Před rokem

      @@anjachi7750 You can use both in the same app but for different purposes.

    • @android_knowledge
      @android_knowledge  Před rokem

      For detailed information, refer below link:
      1. Firebase Authentication:
      firebase.google.com/docs/auth
      2. Firebase Realtime Database:
      firebase.google.com/docs/database

    • @nieall
      @nieall Před rokem

      @@android_knowledge the coding for the realtime database and authentication can be in the same java class or not? I'm using authentication to verified the user through email..but how do I save the same email and username in the realtime database..can you help me with this?

  • @sachinmourya4540
    @sachinmourya4540 Před 9 měsíci

    I am facing app crash. I have written the whole code an implemented accordingly but now i am running the app and it is crashing please help

  • @zhandosmoldakhan13
    @zhandosmoldakhan13 Před rokem

    hello
    do have a login and registration for admin panel video tutorials
    thanks

  • @user-ij3vz5yn4j
    @user-ij3vz5yn4j Před rokem +1

    Hi sir can you make video for shopping cart(add to cart) in android java using firebase🙏🙏

  • @CodeA-ho5ty
    @CodeA-ho5ty Před rokem

    hello i have a question, did you connect the firebase authentication SDK? because im facing an error now and its not inserting a data to a firebase

  • @deepakveluvolu7741
    @deepakveluvolu7741 Před rokem

    hello i have followed every step ,but when i run it shows the same home page,please tell a solution

  • @jaycbelmores2nd335
    @jaycbelmores2nd335 Před rokem

    I hope you include the gender selection for the signup activity, I had confusion about how to store gender data in real-time database

  • @faizaali8009
    @faizaali8009 Před rokem

    Please can you add Shared Preferences as well in this work Kindly.....?

  • @markdugs5573
    @markdugs5573 Před rokem +1

    can you have tutorial fetching the data from a specific user after register then get in and display on the main activity after loging in. thanks a lot

    • @android_knowledge
      @android_knowledge  Před rokem +2

      Here it is, enjoy:
      czcams.com/video/mEfW5vFa0Us/video.html

    • @markdugs5573
      @markdugs5573 Před rokem

      Thanks a lot, I will share this video for all of my friends that need it and ask them to subscribe on your yt channel because it's so helpful

  • @angeloalonzo5500
    @angeloalonzo5500 Před rokem

    Hello thanks for this tutorial, but I still get errors in gradle like: Could not create parent directory for lock file. I already installed a newer version of android studio but still I can't get the app to run. Please help :(

    • @chisomemmanuel6160
      @chisomemmanuel6160 Před rokem

      Yes, that's because you're not running android studio as administrator. Therefore, permission is denied to create parent directory. Although, i fixed mine by copying the java folder which contains the JDK from program files to users/user/myfolder then in android studio settings for build/deployment for gradle, i selected this path -> users/user/myfolder/java for java home then sync

  • @haritmengar
    @haritmengar Před rokem

    can you add forgot password with firebase realtime database (in java in this layouts)

  • @CodeA-ho5ty
    @CodeA-ho5ty Před rokem

    did you change anything in the rules of firebase? because maybe that's the reason why i'm getting an error. THANK YOU

    • @android_knowledge
      @android_knowledge  Před rokem

      No buddy, I have not changed any firebase rules.

    • @CodeA-ho5ty
      @CodeA-ho5ty Před rokem

      @@android_knowledge Thank you for the response, tomorrow i will watch your Other tutorial 😁

    • @chisomemmanuel6160
      @chisomemmanuel6160 Před rokem

      What kind of error are you getting?

  • @devloper_1904
    @devloper_1904 Před 11 měsíci

    Grid and build error is coming please solution

  • @tauhaimeme9295
    @tauhaimeme9295 Před rokem +1

    hello friend, thank you for the source code, but in the process of coding I have a problem that when registering for an account, select the Sign Up button it shows you sign up succesfull but on the realtime database it doesn't show the name just posted Sign like yours, please tell me how to fix it, thanks a lot

    • @android_knowledge
      @android_knowledge  Před rokem

      Is there any error present in logcat?

    • @tauhaimeme9295
      @tauhaimeme9295 Před rokem

      @@android_knowledge No any weird errors in logcat, only 1 warning handleWindowVisibility: no operation for token android.os.BinderProxy@c830c49

    • @chisomemmanuel6160
      @chisomemmanuel6160 Před rokem +1

      Yes, I've encountered same problems too and this is because firebase is unable to read your model class completely, which is due to access modifiers while instantiating the field variables. Also, it'll never show the related error in logcat..
      When creating your model class, you need to make all your fields public so that it can be accessible by firebase and you need to give it a property name see example below;
      class HelperClass {
      @PropertyName("name")
      public String name;
      @PropertyName("email")
      public String email;
      @PropertyName("username")
      public String username;
      @PropertyName("password")
      public String password;
      public HelperClass(String name, String email, String username, String password) {
      this.name=name;
      this.email=email;
      this.username=username;
      this.password=password;
      }
      }
      You can also use hashmap to store them like this and it'll fix same problem
      Map helperClass = new HashMap();
      helperClass.put("name",nameField.getText().toString().trim());
      helperClass.put("email",emailField.getText().toString().trim());
      helperClass.put("username",usernameField.getText().toString().trim());
      helperClass.put("password", passwordField.getText().toString());
      call the setValue(helperClass);

    • @ucanhnguyenphan1415
      @ucanhnguyenphan1415 Před 7 měsíci

      @@chisomemmanuel6160 i've follow your 2 methods, and nothing seems to work, is there any other way i can try? thanks in advance.

  • @centauruspickle7602
    @centauruspickle7602 Před rokem

    How to have intent in code

  • @nv7827
    @nv7827 Před rokem

    hi..i've done all the things based on the video and the corrections also. everything runs perfectly but when i input my data in the sign up page, the data won't load in firebase. so after i sign up it the toast said "sign up sucess" but when i try to login it said "the username does not exist". the inputs wont save in the firebase

    • @nv7827
      @nv7827 Před rokem

      i can email u all my source codes if u want or any other method to validate my codes

    • @android_knowledge
      @android_knowledge  Před rokem

      Any error captured in logcat?

    • @Orock_Senior
      @Orock_Senior Před rokem

      @@android_knowledge I got errors in my Logcat

    • @chisomemmanuel6160
      @chisomemmanuel6160 Před rokem

      Did you use firebase database or firebase firestore?

  • @hs9732
    @hs9732 Před rokem +1

    Sir please make video On login nad singuo with mysql .. please please and also crud system

  • @user-ou8po6wo2j
    @user-ou8po6wo2j Před rokem

    Nice video! 👏🏼
    Im facing an error and when i run the app, it cant launch the signup activity. Error is for LoginActivity and says "The activity must be exported or contain an intent-filter".
    I would appreciate it if you help me.
    Thank you!

    • @android_knowledge
      @android_knowledge  Před rokem +1

      Please refer the below link:
      stackoverflow.com/questions/40508303/the-activity-must-be-exported-or-contain-an-intent-filter

    • @user-ou8po6wo2j
      @user-ou8po6wo2j Před rokem

      Thanks for the response 😊
      Now its working, but i have another problem. When i signup its fine and all data get in firebase, but when i go to login and add the correct username and password it says tha the user doesn't exist.
      Can you help me please

    • @user-ou8po6wo2j
      @user-ou8po6wo2j Před rokem

      I changed the code with the code that Android Knowledge pinned in the comments but it didnt work. So i restart my laptop and now it's fine! Try it and search in your code and check if you miss something.

  • @michaelangelolozande2746

    Would this still work even with no internet,?

    • @android_knowledge
      @android_knowledge  Před rokem +1

      It will but there are few things to keep in mind, check the below official documentation:
      firebase.google.com/docs/database/android/offline-capabilities#section-offline-queries

  • @mayukhsaharoy9777
    @mayukhsaharoy9777 Před rokem

    Thank you for this informative video but actually I am getting one error after running the code , " Execution failed for task ':app:mapDebugSourceSetPaths'. " Please help me how to solve it.

    • @android_knowledge
      @android_knowledge  Před rokem

      The below link might help you:
      stackoverflow.com/questions/72224454/execution-failed-for-task-appmapdebugsourcesetpaths-error-while-evaluatin

    • @android_knowledge
      @android_knowledge  Před rokem

      Summary:
      Update the google gms plugin in gradle build :-)

    • @mayukhsaharoy9777
      @mayukhsaharoy9777 Před rokem

      @@android_knowledge Thank you for the suggestion, now it's working fine

  • @aimanakym_9613
    @aimanakym_9613 Před rokem

    Why error at equals

  • @haritmengar
    @haritmengar Před rokem +1

    can you make same video realted kotlin language?

  • @eoghanfeighery7383
    @eoghanfeighery7383 Před rokem

    Hi, I followed the video and the user account is registered but it doesn't move to the Home page due to missing users. How do I fix it?
    Or was there something I missed?

    • @android_knowledge
      @android_knowledge  Před rokem

      Please go through the source code and check if any line of code you might have missed, by mistakenly :-)

    • @eoghanfeighery7383
      @eoghanfeighery7383 Před rokem

      @@android_knowledge Maybe it's to do with the SDK version

    • @eoghanfeighery7383
      @eoghanfeighery7383 Před rokem

      @@android_knowledge And it's strange since I checked it twice. But I'll take another look.

    • @eoghanfeighery7383
      @eoghanfeighery7383 Před rokem

      I did add a placeholder code for it until I find a permanent solution.

  • @karthickdinesh5589
    @karthickdinesh5589 Před rokem

    where you get backgroud image?

  • @45_kadamsanikajaywant2
    @45_kadamsanikajaywant2 Před 2 měsíci

    'Cannot resolve value R' How to solve this error ?

  • @yelatiakhilsai950
    @yelatiakhilsai950 Před rokem

    Query is not working it showing error.

    • @android_knowledge
      @android_knowledge  Před rokem

      Compare your query from the below source code query:
      androidknowledge.com/login-signup-android-studio-firebase-realtime/

  • @ganesh4406
    @ganesh4406 Před rokem

    Yeah bhai plz help kar tu dekh maine subscribe bhi kiya hai pls update aur deletion bhi bata de plz bhai jaise hai mera tu thoda help karde jaldi video nikal bhej na bhai plz