String bitPath = MediaStore.Images.Media.insertImage(getContentResolver(), bitmap, “”, "");
Uri uuUri= Uri.parse(bitPath);
String path = getRealPathFromURI(uuUri);
public String getRealPathFromURI(Uri contentUri) {//通过本地路经 content://得到URI路径
Cursor cursor = null;
String locationPath = null ;
try {
String[] proj = { MediaStore.Images.Media.DATA };
cursor= getContentResolver().query(contentUri, proj, null, null, null);
int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
cursor.moveToFirst();
locationPath = cursor.getString(column_index);
} catch (Exception e) {
}finally{
if(cursor != null)
{
cursor.close();
}
}
return locationPath;
}