New to Android 4.x

alfcen

Well-Known Member
Licensed User
Longtime User
Hello

B4X:
Dim Out As OutputStream
Out = File.OpenOutput(File.DirRootExternal, "skyatlas/" & pngfile & ".png", False)
Canvas1.Bitmap.WriteToStream(Out, 100, "PNG")
Out.Close

works fine with a 640x960px phone running Android 2.2, but does not
write any file with a tablet 1280x800px running Android 4.03. Tried JPEG, too, but no change.

Anybody more familiar with Android 4.03 and its possible glitches?

Android 4.x virtually bombards me with out-of-memory errors, while the
2-years old phone never complains. Time to care about memory sensitive programming, such as clearing bitmaps and canvases... the better practice, though.
 

Inman

Well-Known Member
Licensed User
Longtime User
Android 4.x virtually bombards me with out-of-memory errors, while the 2-years old phone never complains. Time to care about memory sensitive programming, such as clearing bitmaps and canvases... the better practice, though.

You can try setting android:largeHeap="true" in your Manifest file, which will increase the available heap size for the app, for Android 3.0 and above devices
 
Upvote 0
Top