Graphics Save Image

Bitmap bm = ((android.graphics.drawable.BitmapDrawable) imageview1.getDrawable()).getBitmap();


try {
java.io.File file = new java.io.File(getExternalCacheDir() + "/image.jpg");

java.io.OutputStream out = new java.io.FileOutputStream(file);

bm.compress(Bitmap.CompressFormat.JPEG, 100, out);

out.flush();
out.close();

} catch (Exception e) { showMessage(e.toString()); }
Intent iten = new Intent(android.content.Intent.ACTION_SEND);

iten.setType("*/*");

iten.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(new java.io.File(getExternalCacheDir() + "/image.jpg")));

startActivity(Intent.createChooser(iten, "Save Or Share"));

Komentar

Cara pembuatan Apps paling Populer

Create Stopwatch App in Android using Sketchware

TextInputLayout in Sketchware

How to find and​ highlight a word in a text field in Sketchware?

A Flash Light App in Sketchware

How to enable download in webview in Sketchware apps?

Intent - Open File By Type

Code for implementing Notifications in Sketchware

How to share an image from Drawable folder?

ActionBar back button

Animation Transtition Animation