Here is the code you can use, basically use WebView to take a snapshot and save it somewhere.
private static Bitmap pictureDrawable2Bitmap(PictureDrawable pictureDrawable){ Bitmap bitmap = Bitmap.createBitmap(pictureDrawable.getIntrinsicWidth(),pictureDrawable.getIntrinsicHeight(), Config.ARGB_8888); Canvas canvas = new Canvas(bitmap); canvas.drawPicture(pictureDrawable.getPicture()); return bitmap; } public void getImage() { WebView web=(WebView)findViewById(R.id.your_webviews_id); Picture p=web.capturePicture(); SharedPreferences prefs=con.getSharedPreferences("File_COUNT", con.MODE_PRIVATE); //int count=prefs.getInt(//"COUNT", 0); long rand= System.currentTimeMillis(); File root=new File(Environment.getExternalStorageDirectory()+"/Maps"); root.mkdirs(); File save_img=new File(root.getAbsolutePath()+"/"+rand+".png"); //OutputStream os; try { Bitmap bmp = pictureDrawable2Bitmap(new PictureDrawable(p)); FileOutputStream out = new FileOutputStream(save_img.getAbsolutePath()); bmp.compress(Bitmap.CompressFormat.PNG, 90, out); out.close(); Toast.makeText(con, "Save successful", Toast.LENGTH_SHORT).show(); Intent shareIntent = new Intent(Intent.ACTION_SEND); MimeTypeMap mime = MimeTypeMap.getSingleton(); String type = mime.getMimeTypeFromExtension("png"); shareIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(save_img)); shareIntent.setType(type); startActivity(Intent.createChooser(shareIntent, "Share Using")); } catch (FileNotFoundException e) { // TODO Auto-generated catch block Toast.makeText(con, "File not able to be saved. Please restart app", Toast.LENGTH_SHORT).show(); e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); Toast.makeText(con, "I/O error", Toast.LENGTH_SHORT).show(); } }
Therefore, to send an email, simply attach this image to your email and call Intent email.
source share