I am developing an Android app for API 2.3 and above. I am using the Android camera to take a picture and place the image in a specified file. This works, and once returned I use the file.exists command to check it does and then display it in an image view.
I later pass the image path into an object that gets stored on a DB. I later recall this object, get the path as a string, make a file object and pass it this string. After doing so I call file.exits() which returns true.
However, later on another thread (actually an intent service) I attempt to upload the picture fo a server using the org.apache.http.MultipartEntity and related libraries based approach.
Before I pass the file containing the image path to the multipartEntity I check the file exists. However this time it returns false.
Why would it do this? Why is there an inconsistency. Is there some security permission/feature I am overlooking?