Closed BendiRKO closed 5 years ago
In the demo project, user data will be stored in contacts node in firebase database. Like this :
Here, you can see that there is no value stored in imageurl. so you will not get any image in profile section.
In your custom project, you can change it and pass firebaseauth.getcurrentuser().getprofilepicurl() to fetch the user profile pic url.
Hi, thanks for reply, can you tell me how to do it
You can use any image picker library like this or this to get the image from your user's phone and upload the bitmap to firebase storage or any other online storage and get the URL of that image.
Now pass this URL to "imageurl" variable of "contacts" node in my previous answer. Now you will get the profile pic in your app.
If you want to check it before deploying, manually insert any picture URL in "imageurl" shown in the above image and run your app. You will see the profile pic in your app.
If you are using google signin in your app, just calling firebaseAuth().getCurrentUser().getProfilePic() will return the profile pic url of the current user.
Good luck :)
I am trying to change user profile image and it's not working in app demo on playstore and it's not working on project app demo