当前位置: 代码迷 >> Android >> camera和video的默认存储路径是什么?该怎么解决
  详细解决方案

camera和video的默认存储路径是什么?该怎么解决

热度:153   发布时间:2016-05-01 22:27:23.0
camera和video的默认存储路径是什么?
请问在eclair中,camera和video的默认存储路径是什么?

------解决方案--------------------
private Bitmap createCaptureBitmap(byte[] data) {
// This is really stupid...we just want to read the orientation in
// the jpeg header.
String filepath = ImageManager.getTempJpegPath(); //应该就是这里了吧,看样子应该在SD
int degree = 0;
if (saveDataToFile(filepath, data)) {
degree = ImageManager.getExifOrientation(filepath);
new File(filepath).delete();
}

// Limit to 50k pixels so we can return it in the intent.
Bitmap bitmap = Util.makeBitmap(data, 50*1024);
bitmap = Util.rotate(bitmap, degree);
return bitmap;
}







public static String getTempJpegPath() {
return Environment.getExternalStorageDirectory().toString() +
"/DCIM/.tempjpeg";
}





public static File getExternalStorageDirectory() {
return EXTERNAL_STORAGE_DIRECTORY;
}

找个机器默认设置拍一张看看不就知道了
  相关解决方案