I am trying to check how my application handles the destruction of Android ActivityManager (and later is restarted by Alarm events). In other words, I want to force the message:
I/ActivityManager( 333): No longer want com.myname.myapp (pid 4444): hidden
Is there a way to reliably call an ActivityManager in the "No longer needed" of my application?
A few tricks that I know for completing processes (however, the goal of this question is to find something to call the ActivityManager βNo More Needβ method).
- Using Application Management, click the Power Stop button.
The problem with this is that it does not always look the same as the ActivityManager βNo ActivityManager β method. - Launch many memory lock applications.
The problem with this is unreliable and time-consuming. Sometimes I can run many applications, and I do not see the peep from the ActivityManager . - OS API
killBackgroundProcesses() .
The problem with this is that it was unclear whether the explicit call to killBackgroundProcesses() behave explicitly in the same way as the ActivityManager βNo killBackgroundProcesses() β method.
JamesThomasMoon1979
source share