I am trying to implement the Android Share Intent in order to share out a screen shot of my map via email, facebook, twitter, etc. My thought was to export out the View as a jpg, then attach it. I'm able to export out the view, but the map shows up as black. Every other view element shows up - except for the map.Here's my code:View content = findViewById(R.id.mainlayout); content.setDrawingCacheEnabled(true);
Bitmap b = content.getDrawingCache();
File sdCard = Environment.getExternalStorageDirectory();
File file = new File(sdCard,"zzImage.jpg");
if(file.exists()){
file.delete();
}
try {
b.compress(CompressFormat.JPEG, 100, new FileOutputStream(file));
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
I have also attached two images. One of what it's supposed to look like, and one of the results from the above code.Any ideas?[ATTACH=CONFIG]14605[/ATTACH][ATTACH=CONFIG]14606[/ATTACH]