In my app, I take a screen shot of the current screen (using view.getDrawingCache
) and send it to another activity as a bitmap using intents.
I have tested it on Galaxy Note 1, HTC one v, and Motorolla Xoom mz 604 tablet (10.1"). On the first two devices the code works fine. But on the Xoom tablet the code doesn't work: the tablet starts waiting for long time, and then app crashes.
What could be the reason behind this?
A bitmap of a screenshot can get really big on a tablet, since the screen resolution is likely higher. The problem is probably a memory issue. To overcome this, you can write the bitmap to a temporary file and send the path to the file to the activity.
Alternatively, if the activity you're launching is in the same application, you can use a global variable to hold the bitmap.