views:

38

answers:

1

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 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).

A: 

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.

mreichelt