How to call onLowMemory on a device for testing

I want to test our app for low memory cases.

Do you have any ideas how to call onLowMemory on devices?

Thanks.

+6
source share
1 answer

I just know only one way to do this is to create a method that runs on another thread that leaks memory, make it continuous until onLowMemory() is called, and then stop the thread.

Well, if someone shares experience in this case!

+1
source

Source: https://habr.com/ru/post/898756/


All Articles