Image Share Button in Sketchware

Аватар автора
Java Evolution: эволюция ваших навыков
Hello viewers This video I will show to you How To Share An Image From Sketchware Project . It&very easy..Watch this video attentively.. Here a code is used...Copy from here... Code : 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); 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, "Send image")); Thanks.......

0/0


0/0

0/0

0/0