在onActivityResult方法里面
/**
这个是调用相册的path
*/
Uri uri = data.getData();
Cursor cursor = getContentResolver().query(uri, null, null,null, null);cursor.moveToFirst();
String imageFilePath = cursor.getString(1);
FileInputStream fis = new FileInputStream(imageFilePath);
bitmap = BitmapFactory.decodeStream(fis);
fis.close();
cursor.close();
/**
调用相机
*/
SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmssSSS");
String name = formatter.format(System.currentTimeMillis()) + ".jpg";
Log.i("zhiwei.zhao", "image name:" + name);
Toast.makeText(this, name, Toast.LENGTH_LONG).show();
Bundle bundle =