I have memory problems and I think that this may be due to the creation of large bitmap images.
The challenge is to get a fairly small tile image and create a larger tiled image and set this as a wallpaper for your phone. The way I do this:
1) Create a view with a screen width of 2 *, a screen height of 1 *
2) Set the view background to BitmapDrawable with the tile mode set to repeat
3) Create a bitmap with view sizes
4) draw the view onto the bitmap using: view.draw (new canvas (bitmap))
5) set wallpper: getApplicationContext (). setWallpaper (bitmap)
This works great on my phone (HTC Magic) and other phones that I have tried. But I get error messages related to this problem. I tried to recreate the problem by doubling the required dimensions, and the problem seems to occur in step 4 when the view accesses the bitmap:
ERROR / dalvikvm-heap (124): Massage with a bunch is required (external placement is too large 7372800 bytes)
I am not sure how to solve this. Please help! Thanks
source share