mayank mayank - 6 months ago 54
Android Question

Android file path error

I choose an image from galley and I get the path as:


and the image gets loaded as bitmap. However when I pass the image path in volleyplus multipart request for uploading, I get file not found exception. However, when I give the path as:


then everything works fine. How do I get the image path in this format.


You can use substring method to delete file:// part of your path or

use this method to get real path :

Environment.getExternalStorageDirectory().getAbsolutePath() + "/" + "YourFileName"