I want to get file name from sdcard file path. e.g. :/storage/sdcard0/DCIM/Camera/1414240995236.jpg I want get 1414240995236.jpg I have written the code to fe
/storage/sdcard0/DCIM/Camera/1414240995236.jpg I want get 1414240995236.jpg
The easiest solution is to use Uri.getLastPathSegment():
String filename = uri.getLastPathSegment();