Given that I'm waiting the O.S. kills my app which is in background, for a test, I would develop an app which can occupy a large part (or all) of the device memory .
Any idea?
A loop that adds ImageViews to an activity (in the Activity_Create) containing big images?
Given that I'm waiting the O.S. kills my app which is in background, for a test, I would develop an app which can occupy a large part (or all) of the device memory .
Any idea?
A loop that adds ImageViews to an activity (in the Activity_Create) containing big images?
I mean: there is a limit of memory for each app; then I suppose that, if an app occupy this quantity of memory, the app crashes but my other app in background is safe (and I want the system kills it ) (sorry for my english, sigh).
Create an app using libGDX and load very big textures. They will be loaded in the native memory, not in the Java VM space. This way you can consume the total memory of the device and see nice crashes.
Create an app using libGDX and load very big textures. They will be loaded in the native memory, not in the Java VM space. This way you can consume the total memory of the device and see nice crashes.
The largeheap parameter won't consume all the memory (on some devices, it's far from being the case) and you're not sure that you will kill the instance of your test app this way (Android may decide to kill the other instances of your apps created to fill the memory instead). And creating many apps to fill the memory requires to launch them, one by one.
The only convenient and efficient method is in post #12. It simulates what happens with a big game.