Our Android application PinPoint can send map images via MMS and email. We used the following technique to be able to convert the MapView into an image that could be used across applications.
Firstly create a Bitmap object with the appropriate width and height of your view, along with a configuration. RGB_565 seems to work just fine for the MapView canvas.
Bitmap image = Bitmap.createBitmap(view.getWidth(), view.getHeight(), Bitmap.Config.RGB_565);
Next create a canvas with the bitmap and pass that into the draw() method of the view. This will ask the view to draw it's contents onto the canvas and therefore the associated bitmap.
Next insert the image into the Media library. This returns a URL that refers to the stored image and can be reused across applications. In our case we could pass this URL to the MMS application to have it embed the image in a message. I'll post some sample code of how to send this image via MMS shortly.
String url = Images.Media.insertImage(getContentResolver(), image, "title", null);
To test this in the emulator you'll need to setup an external storage device otherwise you'll see an error like :-
java.lang.UnsupportedOperationException: Unknown URI: content://media/external/images/media
First you'll need to create a storage image using the mksdcard from the tools folder of the emulator
mksdcard 10M sdcard.iso
Then when you start the emulator you need to pass the -sdcard parameter
In my next post I'll write up how to send this image via MMS