Avoid (limit) low memory force close of an activity
I have a problem with an activity force close in android when memory fell down.
My activity has a button that calls a particular class, where some tasks are performed in a separate thread (i开发者_如何学编程t should take up to 10'). On the emulator I have no problem, but on the phone sometimes the activity went closed for low memory reason. I read about startForeground method for services, may I apply the same logic to my app? How can I do it?
Many thanks for any suggestion.
Alessandro.
精彩评论