I am working on game, where player will fly in sky and player will avoid many enemies. But on SGS3 I have "Out of memory 720016 - byte allocation. I have so many bitmaps and i use this code:
BitmapFactory.Options bfOptions=new BitmapFactory.Options();
bfOptions.inSampleSize = 1;
bfOptions.inDither=false;
bfOptions.inPurgeable=true;
bfOptions.inInputShareable=true;
bfOptions.inTempStorage=new byte[16 * 1024];
and I decode many bitmaps with this code
amunicja2_bitmap = BitmapFactory.decodeResource(getResources(),R.drawable.bron2take,bfOptions);
amunicja2_bitmap_full = Bitmap.createScaledBitmap(amunicja2_bitmap, width_amunicja2, height_amunicja2, false);
I have 30 bitmaps like that. My game is still small (1,25MB but there is a OUT OF MEMORY ERROR) What I can do?