【发布时间】:2011-12-04 22:39:21
【问题描述】:
我之前成功使用过这个代码 sn-p,但文件指向 SD 卡上的某个位置。
final File temp = new File(getCacheDir(), "temp.jpg");
temp.delete();
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(temp));
startActivityForResult(intent, CONFIG.Intents.Actions.SELECT_CAMERA_PHOTO);
但是,当我使用 getCacheDir 而不是 SD 卡上的 loc 时,似乎永远不会保存照片。这是缓存目录和图像捕获的限制吗?
【问题讨论】:
标签: android android-camera-intent