Android analog iOS memory alert

On iOS, the application will receive a memory warning by implementing a function called DidReceiveMemoryWarning , which means that RAM is not enough to use. If a version of this warning is sent, the application is likely to be stopped.

Is there something similar (e.g. broadcast intent) in Android to tell my application that we have no memory and that I could programmatically delete some objects?

Thanks.

+4
source share
1 answer

You must define your own custom application object by extending the Android Application class and define this object in the Application tag in the manifest file. In this custom object, you can override the onLowMemory () method.

Hope this helps you.

+8
source

All Articles