title: how to determine when the device has low memory on Android
body: <p>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.</p>