I have an app where users can register/login and do stuff. The user credentials are stored in a database. I am wondering how can I let the user to upload a profile photo on the app, do I need to send the photo to the database or can I do it locally? Let's say the user chooses a photo and it will be set in an ImageView, how can I make it persistent? How can I load the photo onto the ImageView when the user logs in, do I need to use a database or can I do this locally?
Asked
Active
Viewed 99 times
2 Answers
0
You shouldn't save the profile photo locally. If a user log in on another device, he will need to set another profile pic, and this is so wrong. You may upload the pic on the server using an api and fetch it when you need to display it. Then you could use a productive tool lib like picasso for caching it locally.

bashizip
- 562
- 5
- 14
0
you can do it locally if you don't required online process.
you simply store (in Share Preference) path of the image which user have select and use this path every time user log in

Mayur Dabhi
- 3,607
- 2
- 14
- 25