开发者

Android live wallpaper doesn't seem to quit?

I've tried running a variety of live wallpapers. When I set a different one to be live, the old one still shows up in the adb shell when I type 'ps':

app_37    12107 1870  125356 16932开发者_StackOverflow社区 ffffffff afe0da04 S fishnoodle.aquarium_free
app_50    12196 1870  109620 16804 ffffffff afe0da04 S com.geekyouup.android.snowpaper

My own one that I'm building also does this... is there something I'm not understanding about the lifecycle of android apps?

(In my own one, code the service thread finishes, but the it still shows in ps).


Android keeps applications in memory as long as possible, even if they are not running - to ensure a quick response if the user opens up the application again. Live wallpapers are normal Android applications, and because of this they are affected in the same way.

If you are unsure about your service being terminated, you might overwrite the finalize() method of your service and call Log.d("Wallpaper", "finalize()"); to see if it is destroyed by the garbage collector.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜