android 自定義用相機拍照後的照片存儲位置

 
1.imageUri = Uri.fromFile(new File(Environment .getExternalStorageDirectory()+ File.separator + getPackageName(),imageByCamera.toString()));  
  
2.String path = Environment.getExternalStorageDirectory().toString() + File.separator + getPackageName() + File.separator + "IMAGE";  
  File out = new File(path);  
  if (!out.exists()) {  
     out.mkdirs();  
  }  
  out = new File(path, imageByCamera.toString());  
  imageUri = Uri.fromFile(out);  

 

發佈留言