#5 Login and Registration Android App Tutorial Using Firebase Authentication - Display User Profile

Поділитися
Вставка
  • Опубліковано 15 жов 2024
  • This is the fifth part of the Firebase Android Tutorial series. In this video series we will learn how to build a login and registration system using Firebase authentication. In this video, we will learn how to display user profile information using Firebase authentication in android studio
    Watch the entire Firebase video series
    • Firebase Authenticatio...
    🔴 Subscribe for more educational tutorials on CodeWithMazn channel!
    Follow me on Instagram
    / codewithmazn

КОМЕНТАРІ • 112

  • @МаркоШтака-р2к
    @МаркоШтака-р2к 3 роки тому +2

    If someone used a real-time database, replace part of the code:
    DatabaseReference reference = FirebaseDatabase.getInstance().getReference("Users").child(userID);
    reference.addValueEventListener(new ValueEventListener() {
    @Override
    public void onDataChange(@NonNull DataSnapshot snapshot) {
    User userProfile = snapshot.getValue(User.class);
    if(userProfile != null) {
    fullName.setText(userProfile.getFullName());
    email.setText(userProfile.getEmail());
    age.setText(userProfile.getAge());
    }
    Previously, set the get and set methods in the 'User' class
    Thanks for the great tutorials! You helped me a lot.

    • @marthinvictorhansen9411
      @marthinvictorhansen9411 3 роки тому +1

      hey, i tried to change code to this, but my apk still cant display values and it's force close. can you help me?

  • @baroncandy3939
    @baroncandy3939 2 роки тому

    i saw a few before this which did not work this is smallest code i have seen for far for this work and worked flawlessly thanks a lot

  • @guyalalee5090
    @guyalalee5090 3 роки тому +7

    Hi, can you make how to update the data? I've been following you channel and I have to say you're the best tutorial channel ever !!

  • @ahmednasif5443
    @ahmednasif5443 3 роки тому +2

    This video is great and well explained , deserves the most views among all the similar tutorials

  • @muhammadadel9029
    @muhammadadel9029 2 роки тому

    That’s so wonderful declaration thanks alot
    So i have this question can i give access 2 user for editing his info & how

  • @smileilunga2820
    @smileilunga2820 2 роки тому

    I am wondering how to do this with web development, so I am creating new users with firebase and it saves on the database but I have no idea how to make the profile on the website
    Can you help?

  • @meminnasha4080
    @meminnasha4080 3 роки тому +1

    I can't fetch any data from firebase? Why? is there any solution

  • @thaile8172
    @thaile8172 2 роки тому

    Thanks for your great tutorial but I got a problem, my app is crashed when I call function addListenerForSingleValueEvent, do you have any idea? Thanks a lot ^^

  • @dtk4548
    @dtk4548 4 роки тому +4

    error-
    Run console:
    Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.google.firebase.auth.FirebaseUser.getUid()' on a null object reference
    at com.test.test.ProfileView.onCreate(ProfileView.java:34)
    any solution to this error ?

  • @thubigdog4333
    @thubigdog4333 2 роки тому

    Hello kind sir, all of the video is great and i understand thanks to you but when i do the display data my app crashes whenever i login, i just cant seem to get the data from the database, do you have any idea what is the problem ?

  • @n2datasolutions443
    @n2datasolutions443 Рік тому

    I tried this but on an additional page called UserProfile, so once the user gets to their main activity they would click the profile button to get there and they can view/edit their user details, this isn't however working at the moment and doesn't even display the user details, any knowledge on why?

  • @techgamer646
    @techgamer646 4 роки тому +2

    please make video on shared preference
    when sure open the app first time then show login screen and then user open the app second time then do not need the login direct redirected on main page screen
    please make a video on this concept

  • @rayancrasta7460
    @rayancrasta7460 3 роки тому +1

    Best video ever for Firebase Auth .

    • @CodeWithMazn
      @CodeWithMazn  3 роки тому

      I am glad that you liked it! More firebase tutorials are coming! Stay tuned

  • @sudarshanakonwar3458
    @sudarshanakonwar3458 3 роки тому +1

    Sir, your videos are awesome.. Would be grateful if you also show how to update the users profile..

  • @kennethdelacruz9485
    @kennethdelacruz9485 2 роки тому

    how to go back in the recent activity after the user switch to other apps, while the user is currently logged in?

  • @jay-annoliveros5358
    @jay-annoliveros5358 2 роки тому

    Hello, I have a problem. After clicking log in the ProfileActivity will crash.

  • @eoghanfeighery7383
    @eoghanfeighery7383 Рік тому

    Hi Mazn, did you have a video for editing a profile and saving it to Realtime Firebase? Because I made one for it but it keeps crashing when I run it.

  • @ranjinisunderaraj7844
    @ranjinisunderaraj7844 2 роки тому

    Hello sir. This video's are so good and benefits for me. I am currently doing my fyp . Sir in this video I can see user display profile there is only logout. Can u create same like this and insert this feature like user profile name age email that can able to change with edit, update and delete button . When they change here it automatically change in firebase database. Like. That

  • @maul_grab
    @maul_grab 2 роки тому +1

    Great video! I was wondering how you would go about adding this sort of functionality to fragments within my app, such as a login/register fragment or a profile information fragment that fetches your data from firebase.

    • @africanchild3784
      @africanchild3784 2 роки тому

      I have the same question

    • @riskiadhitama
      @riskiadhitama 5 місяців тому

      #astra
      #triton
      #sarigiri
      #kotabumi
      #pondokaren
      #cengkareng
      #kalideres
      #tanahabang
      #pondokkopi

  • @ayushkhare4231
    @ayushkhare4231 3 роки тому

    Thank You for teaching in such simple way !!!

  • @colenevargas1937
    @colenevargas1937 3 роки тому +4

    I followed your tutorials about logging in and registration, and they helped me a lot. I've just got this problem, when I try this tutorial, why I can't display the values?

  • @palakshravagi4968
    @palakshravagi4968 3 роки тому +1

    This video is so helpful and informative thank you, Keep it up.

  • @woonie3134
    @woonie3134 3 роки тому

    Can I add this if I already have a user registered. I did not set up database on firebase yet but my user can login and register confused.

  • @willsimz144
    @willsimz144 2 роки тому

    Great step by step , although the values in the profile are not showing for me in the profile but i do see them in the Realtime database , any suggestions?

    • @riskiadhitama
      @riskiadhitama 5 місяців тому

      #atm
      #btn
      #org
      #ktp
      #mtv
      #tng
      #spg
      #pns
      #gps

  • @colenevargas1937
    @colenevargas1937 3 роки тому +1

    Can u please help me? I followed your tutorial but why it doesn't show the values on my next activity?

  • @kennethpacatang1177
    @kennethpacatang1177 2 роки тому

    Nice tutorial!,
    sir, can you make tutorial how to display user info in fragmen, bottom navigation view

  • @freefiretiktokfree2445
    @freefiretiktokfree2445 3 роки тому

    why user details are not displaying in my app ,is there problem in database settings

  • @aldrichnavoa5173
    @aldrichnavoa5173 3 роки тому

    i follow all of your video, but i can't display the name, theres no error.

  • @princekumarkushwaha
    @princekumarkushwaha 2 роки тому

    i am also not able to display the values from firebase, like everyone here, anyone finds any solution?

  • @kamalabaikattimani6994
    @kamalabaikattimani6994 3 роки тому

    Dear sir I got error like "Andriod resources linking failed" How to fix it..
    Please help me.

  • @hugomiguel3762
    @hugomiguel3762 3 роки тому +1

    hey, for some weird reason I can't get the names from the database, I think it's because the user is always assigned as null and I don't know what to do, I would appreciate your help.

  • @ainaafifah5687
    @ainaafifah5687 3 роки тому

    Hi Mazn, what a great tutorial you have here! I run my program but it only displays the name and the rest is left blank. Can you help me perhaps?

  • @alon12michno52
    @alon12michno52 6 місяців тому

    Thank youuuuuuuuu this video tutorial is amazingggggggggggggggggggggg

  • @jesmarsuan5516
    @jesmarsuan5516 3 роки тому +1

    no "Users" at Start Collection pls help

  • @Verum_Rex
    @Verum_Rex 2 роки тому

    You didn't show if the user ID has changed. I followed the steps in this tutorial and it's still giving me random user ID info. How can I make it so that user ID matches like their email or name?

    • @loudeternitygaming2327
      @loudeternitygaming2327 Рік тому

      i have the same issue but the uid is incrementing when i create another account it matches the uid from the previous user that i created

  • @ZaidKhan-hs2uv
    @ZaidKhan-hs2uv 3 роки тому

    Great video .As amazing as its simple.Keep it up.Subscribed

  • @abdelrahmanali9922
    @abdelrahmanali9922 3 роки тому

    Thank You very much it helped me so much

  • @maraiiamina3575
    @maraiiamina3575 2 роки тому

    very helpful tutorial please how can I update user profile any help please

  • @ravi1341975
    @ravi1341975 3 роки тому

    HI,
    why 'final' modifier for the TextView?

  • @meditainment4225
    @meditainment4225 3 роки тому

    Your way of teaching is love and i want you to be my teacher 😊😊, please make a video on how to send notification to specific user from 🔥 firebase

    • @CodeWithMazn
      @CodeWithMazn  3 роки тому +1

      Thank you the kind words! I am happy that my tutorial helped! I will add your suggestion to my list!

  • @ethanhunt8345
    @ethanhunt8345 3 роки тому +1

    can we get source code of all your lectures

  • @zoroslvr
    @zoroslvr 2 роки тому

    THANK YOU SO MUCH. YOU SAVED MY LIFE

  • @tejkirankushwaha1439
    @tejkirankushwaha1439 2 роки тому

    What an awesome tutorial!!!!!!!!!!!!!!!!!!!!!! 🎉🤗

  • @randunumysterio8398
    @randunumysterio8398 3 роки тому +1

    Why I can't fetch any data :(

  • @formaapp6673
    @formaapp6673 3 роки тому

    please how to use firestore service instead of realtime , I am having sleepless nights trying to work on it

  • @scharvaljoseph6142
    @scharvaljoseph6142 3 роки тому

    Can you create a video for images as well?

  • @ndhdysu5933
    @ndhdysu5933 3 роки тому

    How can I show the unique ID from the database?

  • @nayeembaig
    @nayeembaig 2 роки тому

    Please help its not working details aren't displaying 😥

  • @sandirensan9907
    @sandirensan9907 2 роки тому

    how to access a child node under users node ???

  • @hunt6644
    @hunt6644 3 роки тому

    Bro upload video of how to upload file in current user and retrieveing

  • @Ventus277
    @Ventus277 3 роки тому +2

    I know this video is old, but a video on how to update these informations from the app (like an update profile button) could be really useful

    • @sicx3770
      @sicx3770 3 роки тому

      yea, i hope he continue the series with the update profile function.

  • @obichidi233
    @obichidi233 3 роки тому

    Thank You ! This helped lots!

  • @muhtakdim3151
    @muhtakdim3151 3 роки тому +1

    please tutorial for remember me use database realtime

  • @youssefmansour5756
    @youssefmansour5756 3 роки тому

    perfect tutorial thanks alot !
    you can add one more video about, if i logged in then i close the app then reopen it i have to login again, it must take me to the Profile Activity directly.. i hope if you can complete this playlist because it's perfect but it lack only this thing !
    again thanks for the playlist it;s really good..

    • @youssefmansour5756
      @youssefmansour5756 3 роки тому +2

      Actually i found out how to do that guys. just add function in the main activity in the end.
      @Override
      protected void onStart() {
      super.onStart();
      FirebaseUser user = mAuth.getCurrentUser();
      if(user != null){
      startActivity(new Intent(MainActivity.this, ProfileActivity.class));
      finish();
      }
      }
      }
      you;re welcome guys

    • @CodeWithMazn
      @CodeWithMazn  3 роки тому +1

      Thank you for your comment. I will add this to my list and will upload it soon!

    • @CodeWithMazn
      @CodeWithMazn  3 роки тому +1

      Thank you!

    • @youssefmansour5756
      @youssefmansour5756 3 роки тому

      @@CodeWithMazn actually thank you. i want to ask you about something.
      i already did the login part and i want to merge between two projects and i couldn't i tried a lot of ways but also i couldn't. can i contact you on instgram and tell what should i do or can you make a tutorial about it!?
      sorry for asking so much but you're so awesome and clear with your videos so that's why im asking YOU not someone else..

  • @hananiadan7789
    @hananiadan7789 2 роки тому

    THANK YOU!!!! ARGHH YOU THE BEST

  • @sudhamshubhat2285
    @sudhamshubhat2285 4 роки тому

    Can you please tell how to change the fullname when user wants to change it?

    • @CodeWithMazn
      @CodeWithMazn  4 роки тому

      Check Firebase documentation. I will upload a video soon on how to update data in Firebase

    • @nishantchoudhary7865
      @nishantchoudhary7865 4 роки тому

      @@CodeWithMazn please make it ASAP with respect to this series

  • @rafi481
    @rafi481 Рік тому

    How to make uid visible?

  • @longtrinhdev
    @longtrinhdev 3 місяці тому

    thank you very much.

  • @jyoti583
    @jyoti583 4 роки тому

    Eagerly waiting for next parts. Please complete this series 🤗. I am following this series.

    • @CodeWithMazn
      @CodeWithMazn  4 роки тому +2

      Then, I will upload a new video for you in an hour!

  • @iosdeveren
    @iosdeveren 4 роки тому

    You're amazing bro! Perfect, I'm waiting for new videos :D
    Please make a chat system with firebase, it would be really nicee

    • @CodeWithMazn
      @CodeWithMazn  4 роки тому +5

      I am actually thinking to create a chat application video tutorial using Firebase. I will be working on it soon!!

    • @iosdeveren
      @iosdeveren 4 роки тому

      MetaMaze It would be Reallyyy nicee, I will be waiting for it..

    • @farkyank
      @farkyank 3 роки тому

      hocam eğer unutmadıysanız bana yardımcı olabilir misiniz?

  • @graziaorlando255
    @graziaorlando255 4 роки тому

    21 th like ! i love you !! ||

  • @munibaatiq137
    @munibaatiq137 2 роки тому

    Thanks A lot Sir!! Great Tutorial Very helpful & Easy To Understand .I'm Thankful to you For this Kindness.

  • @armiskana3086
    @armiskana3086 3 роки тому

    thank you for this tutorial you help me :)

  • @toanpham4049
    @toanpham4049 2 роки тому

    can you do the edit profile plsssssss .i love you

  • @nishantchoudhary7865
    @nishantchoudhary7865 4 роки тому

    Can you give some resources on how to edit profile

    • @CodeWithMazn
      @CodeWithMazn  4 роки тому +1

      You can check Firebase documentation on how to update and delete section. firebase.google.com/docs/database/web/read-and-write#update_specific_fields

    • @nishantchoudhary7865
      @nishantchoudhary7865 4 роки тому

      @@CodeWithMazn thanks

  • @denizaygun4909
    @denizaygun4909 2 роки тому

    not working

  • @freefiretiktokfree2445
    @freefiretiktokfree2445 3 роки тому

    great

  • @raigor1415
    @raigor1415 3 роки тому

    love it

  • @christianconcepcion571
    @christianconcepcion571 3 роки тому

    source code please

  • @krileks
    @krileks 2 роки тому +1

    To those who can't obtain data from Firebase:
    Replace:
    reference = FirebaseDatabase.getInstance().getReference("User");
    to:
    reference = FirebaseDatabase.getInstance("You might need to put your URL from real-time Firebase database ").getReference().child("Users").child(userID);

  • @hselin
    @hselin Рік тому +1

    For everyone who cant get the information to pop up, fear not! I have the solution
    change:
    reference = FirebaseDatabase.getInstance().getReferenceFromUrl("Your firebase url here")
    .child(FirebaseAuth.getInstance().getCurrentUser().getUid());
    and
    reference.addValueEventListener(new ValueEventListener() {
    basically just change the Singlevalueevent to valueeventlistener
    You're welcome!

    • @LP-tm5tr
      @LP-tm5tr Рік тому

      you are a life saver, thanks

  • @colenevargas1937
    @colenevargas1937 3 роки тому +1

    Can u please help me? I followed your tutorial but why it doesn't show the values on my next activity?

    • @scharvaljoseph6142
      @scharvaljoseph6142 3 роки тому

      You need to ensure that you are referencing the correct firebase ID for the specific ID

  • @sujonali7581
    @sujonali7581 3 роки тому +1

    but there catch null pointer exeption...how can i fix

    • @wyattearp84
      @wyattearp84 3 роки тому

      you might have a wrong field id

  • @colenevargas1937
    @colenevargas1937 3 роки тому +1

    Can u please help me? I followed your tutorial but why it doesn't show the values on my next activity?