I'm dealing with the "Low memory: no more background process" problem. My activity is at background and killed when the situation occurs.
I'm trying to save and load the instance state to solve it.
But since it doesn't happen every time. How should I 开发者_高级运维test my activity with this situation?
Thanks!
You can force your process to die through adb.
> adb shell
# ps
# kill -9 <pid>
where <pid>
is the process id of your app. Caveat: I don't know if this method of ending the process is the same as when the OS decides it needs more resources.
Another approach might be to do it through Settings (click on your app under Application Management and then on the Force Stop button).
精彩评论