try { ? ? ? ? ? ? ? ??? ?if (outputImage.exists()) {
? ? ? ? ? ? ? ? ? ??? ?outputImage.delete();
? ? ? ? ? ? ? ? ???}
? ? ? ? ? ? ? ? ? ?outputImage.createNewFile();
? ? ? ? ? ? ???} catch (Exception e) {
? ? ? ? ? ? ? ? ???e.printStackTrace();
? ? ? ? ? ? ? ?}? ? ? ? ? ? ? ?if (Build.VERSION.SDK_INT >= 24) {
? ? ? ? ? ? ? ? ???imageUri = FileProvider.getUriForFile(MainActivity.this, ? ? ? ? ? ? ? ? ? ? ? ? ? ?"com.gyq.cameraalbumtest.fileprovider", outputImage);
? ? ? ? ? ? ???} else {
? ? ? ? ? ? ? ? ???imageUri = Uri.fromFile(outputImage);
? ? ? ? ? ? ???}
這段代碼的意思
Quiet_time
2018-05-31 20:37:43