当前位置:操作系统 > 安卓/Android >>

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);  

 

补充:移动开发 , Android ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,