Android Question Photo file locations on a device

Shadow&Max

Active Member
Licensed User
Longtime User
I'm doing an app that will store a picture with some records in a database. If a user shoots a picture on their phone, where does it get stored? Does it get stored internally or on the SD card? If they choose to use that file, can I retrieve that photo file and store it myself on internal storage? Or should I even do so?

If you call for an image file, and it isn't there, what error or proc do you get and respond to?

I'm assuming (although that's a dangerous thing lol) that photos are usually saved on the SD card. Does the user have a choice on the phone of where photos are saved when they're taken? I know I can save a URL for a photo that's on the web... but I want to know how to handle pictures taken for the purpose of my app...

I don't have an android device right now, so I can't test this myself.
 

Shadow&Max

Active Member
Licensed User
Longtime User
OK, thanks, I'll play with that Erel...

How do I trap file errors like if that picture has been deleted from the user's system/device?
 
Upvote 0

Shadow&Max

Active Member
Licensed User
Longtime User
Thanks but that really wasn't the question!

If the user has selected a photo, and I've stored the location, and then the user deletes that photo, either deliberately or inadvertently, what specific messages will my app get when it tries to access a photo that's no longer there?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
If you want to load an image without checking if the file exists before you load it then you will get an Exception FILE NOT FOUND.
It´s always better to do a File.Exists(dir, file) before when you want to load an saved imagename.
 
Upvote 0

Shadow&Max

Active Member
Licensed User
Longtime User
Thanks Manfred... That helps...
 
Upvote 0
Top