【发布时间】:2011-06-13 05:30:56
【问题描述】:
我正在尝试将通过 android 相机拍摄的图像保存在自定义位置。我的代码如下所示:
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
File f = File(android.os.Environment.getExternalStorageDirectory(), "test.jpg");
intent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT, Uri.fromFile(f));
startActivityForResult(intent, SUB_ACTIVITY_CAMERA_PREVIEW);
图像被保存到所需位置,但它也被保存到默认相机文件夹,这导致它显示在图库中。有什么建议吗?
【问题讨论】:
标签: android camera android-gallery