This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static void saveBitmapAsNewFile(Bitmap target){ | |
// Define directory names | |
String fileName = "new_file.jpg"; /* or Replace with yout filename*/ | |
String root = "/my_images/"; | |
OutputStream outputStream = null; | |
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q){ | |
ContentResolver resolver = getApplicationContext().getContentResolver(); |