ライブ壁紙で使用する写真をトリミングしようとしていますが、トリミング アクティビティが新しいトリミングされた画像を保存しようとすると、FileNotFoundException が発生します。これは私が使用しているコードです:
File file = new File(getFilesDir(), "wallpaper.jpg");
Intent intent = new Intent("com.android.camera.action.CROP");
intent.setData(uri);
DisplayMetrics metrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(metrics);
intent.putExtra("outputX", metrics.widthPixels * 2);
intent.putExtra("outputY", metrics.heightPixels);
intent.putExtra("aspectX", metrics.widthPixels * 2);
intent.putExtra("aspectY", metrics.heightPixels);
intent.putExtra("scale", true);
intent.putExtra("noFaceDetection", true);
intent.putExtra("output", Uri.parse("file:/" + file.getAbsolutePath()));
startActivityForResult(intent, REQUEST_CROP_IMAGE);
wallpaper.jpg ファイルは DDMS ファイル エクスプローラーに存在するように見えるので、何が間違っているのかわかりません。どんなアドバイスでも大歓迎です。