mapview.getMapDrawingCache() returns null

Discussion created by swatikch on Dec 30, 2011
Latest reply on Aug 1, 2012 by agup-esristaff
I am trying to create a bitmap image of the Map (MapView object) as follows:

Bitmap drawingCache = mapview.getDrawingCache(true);
Btimap bitmap = mapview.getDrawingMapCache(0, 0, mapview.getWidth(), mapview.getHeight());
Bitmap drawingCache = mapview.getDrawingCache(false);

This returns a null in my 'bitmap' object. What is the correct way of using mapview.getMapDrawingCache method for getting map image?