我自己实现的CameraActivity拍照之后想给照片存储在指定位置用的如下程序: File myPictureFile = new File("/sdcard/newpicture.jpg");
try{
BufferedOutputStream bos = new BufferedOutputStream (new FileOutputStream(myPictureFile));
bitmap.compress(Bitmap.CompressFormat.JPEG, 100,bos);
bos.flush();
bos.close();
barcodeImageView.setImageBitmap(bitmap);
}catch(Exception e){
Log.w(TAG,e);
}结果找不到路径怎么回事????
try{
BufferedOutputStream bos = new BufferedOutputStream (new FileOutputStream(myPictureFile));
bitmap.compress(Bitmap.CompressFormat.JPEG, 100,bos);
bos.flush();
bos.close();
barcodeImageView.setImageBitmap(bitmap);
}catch(Exception e){
Log.w(TAG,e);
}结果找不到路径怎么回事????
把路径换成这个试试
把路径换成这个试试,刚才少写了个斜线,
我也是遇到这个问题,但是加了SD的权限也是不行的,请问下你是怎么给SD卡加入权限的
谢了
barcodeImageView.setImageBitmap(bitmap)
谢了