我想从sdcard文件路径获取文件名.例如:/storage/sdcard0/DCIM/Camera/1414240995236.jpg I want get 1414240995236.jpg
我已经编写了代码来获取相同的但它无法正常工作.请帮忙.
以下是我的代码:
@Override
protected void onActivityResult( int requestCode, int resultCode, Intent data)
{
if ( requestCode == CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE) {
if ( resultCode == RESULT_OK) {
/*********** Load Captured Image And Data Start ****************/
String imageId = convertImageUriToFile( imageUri,CameraActivity);
// Create and excecute AsyncTask to load capture image
new LoadImagesFromSDCard().execute(""+imageId);
/*********** Load Captured Image And Data End ****************/
} else if ( resultCode == RESULT_CANCELED) {
Toast.makeText(this, " Picture was not taken ", Toast.LENGTH_SHORT).show();
} else {<