you can simple use this.
public void sendMyData(View v){
Bitmap cs = null;
tableMessage.setDrawingCacheEnabled(true);
tableMessage.buildDrawingCache(true);
cs = Bitmap.createBitmap(tableMessage.getDrawingCache());
Canvas canvas = new Canvas(cs);
tableMessage.draw(canvas);
canvas.save();
tableMessage.setDrawingCacheEnabled(false);
String path = Images.Media.insertImage(getContentResolver(), cs,
"MyTableOutput", null);
Uri uri = Uri.parse(path);
Intent sharingIntent = new Intent(Intent.ACTION_SEND);
sharingIntent.setType("image/png");
sharingIntent.putExtra(Intent.EXTRA_STREAM, uri);
startActivity(Intent.createChooser(sharingIntent,
"Share image using"));
}
Now in your xml file se this for your Button.
android:onClick = "sendMyData"
Add permission to manifest file also.
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />