filmov
tv
How to save bitmap to image file in Download folder from your Android App? Android 14 | API level 34

Показать описание
In this video it shows the steps to save a bitmap to image file in download folder from your Android App programmatically. It demonstrates this for Android 14 - API level 34
In this video it refers to the code from my below pages of posted earlier:
Complete source code and other details/ steps of this video are posted in the below link:
However, the main Java code is copied below also for reference:
public class MainActivity extends AppCompatActivity {
private ImageView imageView;
private URL url;
private Bitmap bitmap;
@Override
protected void onCreate(Bundle savedInstanceState) {
Thread thread = new Thread(new Runnable() {
@Override
public void run() {
try {
} catch (Exception e) {
throw new RuntimeException(e);
}
}
});
}
public void buttonSaveImage(View view){
StorageManager storageManager = (StorageManager) getSystemService(STORAGE_SERVICE);
+ ".jpeg");
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
try {
FileOutputStream fileOutputStream = new FileOutputStream(fileImage);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
--
In this video it refers to the code from my below pages of posted earlier:
Complete source code and other details/ steps of this video are posted in the below link:
However, the main Java code is copied below also for reference:
public class MainActivity extends AppCompatActivity {
private ImageView imageView;
private URL url;
private Bitmap bitmap;
@Override
protected void onCreate(Bundle savedInstanceState) {
Thread thread = new Thread(new Runnable() {
@Override
public void run() {
try {
} catch (Exception e) {
throw new RuntimeException(e);
}
}
});
}
public void buttonSaveImage(View view){
StorageManager storageManager = (StorageManager) getSystemService(STORAGE_SERVICE);
+ ".jpeg");
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
try {
FileOutputStream fileOutputStream = new FileOutputStream(fileImage);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
--
Комментарии