#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
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.
hey, i tried to change code to this, but my apk still cant display values and it's force close. can you help me?
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
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 !!
This video is great and well explained , deserves the most views among all the similar tutorials
That’s so wonderful declaration thanks alot
So i have this question can i give access 2 user for editing his info & how
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?
I can't fetch any data from firebase? Why? is there any solution
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 ^^
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 ?
Did you solve it by now???
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 ?
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?
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
I will definitely put it in my list!
Yes please make it
@@CodeWithMazn but not yet! 😑
Best video ever for Firebase Auth .
I am glad that you liked it! More firebase tutorials are coming! Stay tuned
Sir, your videos are awesome.. Would be grateful if you also show how to update the users profile..
how to go back in the recent activity after the user switch to other apps, while the user is currently logged in?
Hello, I have a problem. After clicking log in the ProfileActivity will crash.
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.
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
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.
I have the same question
#astra
#triton
#sarigiri
#kotabumi
#pondokaren
#cengkareng
#kalideres
#tanahabang
#pondokkopi
Thank You for teaching in such simple way !!!
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?
same here
Same here
Same here
This video is so helpful and informative thank you, Keep it up.
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.
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?
#atm
#btn
#org
#ktp
#mtv
#tng
#spg
#pns
#gps
Can u please help me? I followed your tutorial but why it doesn't show the values on my next activity?
same problem
Nice tutorial!,
sir, can you make tutorial how to display user info in fragmen, bottom navigation view
why user details are not displaying in my app ,is there problem in database settings
i follow all of your video, but i can't display the name, theres no error.
i am also not able to display the values from firebase, like everyone here, anyone finds any solution?
Dear sir I got error like "Andriod resources linking failed" How to fix it..
Please help me.
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.
did you find out?
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?
yes
Thank youuuuuuuuu this video tutorial is amazingggggggggggggggggggggg
no "Users" at Start Collection pls help
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?
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
Great video .As amazing as its simple.Keep it up.Subscribed
Thank You very much it helped me so much
very helpful tutorial please how can I update user profile any help please
HI,
why 'final' modifier for the TextView?
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
Thank you the kind words! I am happy that my tutorial helped! I will add your suggestion to my list!
can we get source code of all your lectures
THANK YOU SO MUCH. YOU SAVED MY LIFE
What an awesome tutorial!!!!!!!!!!!!!!!!!!!!!! 🎉🤗
Why I can't fetch any data :(
please how to use firestore service instead of realtime , I am having sleepless nights trying to work on it
Can you create a video for images as well?
How can I show the unique ID from the database?
Please help its not working details aren't displaying 😥
how to access a child node under users node ???
Bro upload video of how to upload file in current user and retrieveing
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
yea, i hope he continue the series with the update profile function.
Thank You ! This helped lots!
please tutorial for remember me use database realtime
Do you got it
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..
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
Thank you for your comment. I will add this to my list and will upload it soon!
Thank you!
@@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..
THANK YOU!!!! ARGHH YOU THE BEST
Can you please tell how to change the fullname when user wants to change it?
Check Firebase documentation. I will upload a video soon on how to update data in Firebase
@@CodeWithMazn please make it ASAP with respect to this series
How to make uid visible?
thank you very much.
Eagerly waiting for next parts. Please complete this series 🤗. I am following this series.
Then, I will upload a new video for you in an hour!
You're amazing bro! Perfect, I'm waiting for new videos :D
Please make a chat system with firebase, it would be really nicee
I am actually thinking to create a chat application video tutorial using Firebase. I will be working on it soon!!
MetaMaze It would be Reallyyy nicee, I will be waiting for it..
hocam eğer unutmadıysanız bana yardımcı olabilir misiniz?
21 th like ! i love you !! ||
Thanks A lot Sir!! Great Tutorial Very helpful & Easy To Understand .I'm Thankful to you For this Kindness.
thank you for this tutorial you help me :)
You're welcome 😊
can you do the edit profile plsssssss .i love you
Can you give some resources on how to edit profile
You can check Firebase documentation on how to update and delete section. firebase.google.com/docs/database/web/read-and-write#update_specific_fields
@@CodeWithMazn thanks
not working
great
love it
source code please
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);
i still cant do it :D
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!
you are a life saver, thanks
Can u please help me? I followed your tutorial but why it doesn't show the values on my next activity?
You need to ensure that you are referencing the correct firebase ID for the specific ID
but there catch null pointer exeption...how can i fix
you might have a wrong field id
Can u please help me? I followed your tutorial but why it doesn't show the values on my next activity?
Try check for the rules in Realtime Database