Код: Выделить всё
imageCapture = new ImageCapture.Builder()
.setTargetResolution(new Size(800, 600))
.setCaptureMode(ImageCapture.CAPTURE_MODE_MINIMIZE_LATENCY)
.build();
Код: Выделить всё
protected File getOutputDirectory(Context context) {
File mediaDir = context.getFilesDir();
if (mediaDir != null) {
File appDir = new File(mediaDir, "ArrowGame2");
appDir.mkdirs();
if (appDir.exists()) {
Log.i(TAG, appDir.getPath());
return appDir;
}
}
return context.getFilesDir();
}
Код: Выделить всё
File file = new File(play.arr.androidLauncher.getOutputDirectory(play.arr.androidLauncher.getContext()), play.selectedPhotoFile);
boolean deletedSuccess = file.delete();

Подробнее здесь: https://stackoverflow.com/questions/785 ... oid-device