Android save user profile picture

3

I am wondering what is the best method to save the user profile image of the app I am developing, where on the login screen will load the user profile picture and home screen as well. By the research I did have 2 ways:

1st) Save the image in the database.

2nd) Save the image in an internal folder of the app and in the database save the path of that image.

Someone knows the best way to consume less processing resources. And in the case of saving to an internal folder like I can do that.

    
asked by anonymous 22.12.2015 / 01:25

1 answer

2

Neither way will cause processing problems. You are working with reading data. This is orders of magnitude slower than anything the processor might be doing. Processor is the least of your problems.

Since we are talking about a binary file, it makes more sense for me to save in your application folder. Assuming that your application only allows one login at a time, you do not even need to save the photo path in a database - a fixed path resolves this (think something like /address/application/profile.jpg).

As for how to do this, I think you already have a pretty complete answer here: link

For any unanswered questions there or in another question, feel free to open a new one.

    
22.12.2015 / 06:49