My app is a background service running in the foreground. In low memory situations some of my processing threads are being killed without the app being restarted. This is causing very strange behavior. I would like to be alerted by the OS when the memory is low before my process are killed. This will allow me to release memory or restart my app. I can’t seem to find a broadcast or notification for this situation.
My app is a background service running in the foreground. In low memory situations
Share
We can change this by changing macro DEFAULT_THRESHOLD_PERCENTAGE inside file DeviceStorageMonitorService.java.
In case of full memory intent ACTION_DEVICE_STORAGE_FULL
Receive this broadcasted intent in your receiver and handle the application.