Could this possible be because the Share Intent cannot access the image in
my applications cache folder?
I tried the code below but that didnt work either. What would be the best
way to do this?
Thanks
String cachePath = this.getDir("ScreenShots",
Context.MODE_WORLD_READABLE).getPath() ;
Bitmap viewCapture = null;
graphView.setDrawingCacheEnabled(true);
viewCapture = Bitmap.createBitmap(graphView.getDrawingCache());
graphView.setDrawingCacheEnabled(false);
boolean a = viewCapture.compress(CompressFormat.JPEG, 100, new
FileOutputStream(cachePath+"/PlantPulse.jpeg"));
Intent share = new Intent(Intent.ACTION_SEND);
share.setType("image/jpeg");
//String path = getDir("PlantPulse.jpeg",
Context.MODE_WORLD_READABLE).getPath();
File file = new File(cachePath+"/PlantPulse.jpeg");
Uri outputFileUri = Uri.fromFile(file);
share.putExtra(Intent.EXTRA_STREAM,outputFileUri);
startActivity(Intent.createChooser(share, "Share Plot Using..."));
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en