开发者

OnLowMemory getting called

I am doing an App which access the gprs .I am facing problem when the user starts another application who uses gprs also like google maps .It takes it own heap memory ,after doing some operation on Maps app it calls OnLowMemory of my service .and my ui is also killed in background. I am not getting any proper tutorial haw can i start my app when it i开发者_StackOverflow社区s getting killed during onLowMemory ,or is there any other way to handle it .

Thanks in advance.


There's no way you can relaunch your app. The Android OS takes care of killing low priority apps when it starts running out of memory. What you should do is try to save any state before your app gets killed. When the app is launched again, check if there's any state saved and restore your app to the last state.

You should also look as to why your phone is running low on memory, maybe your app is not cleaning up properly or using too many images, bitmaps, etc that use up a lot of memory?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜