onDestroy() seems to be called regularly before the process vanishes, but onDestroy() is not. The process is just gone.
On Wed, Jul 15, 2009 at 11:58 AM, Mariano Kamp <[email protected]>wrote: > Also, what is the best way to deal with wake locks in these situations? > > > On Mon, Jul 13, 2009 at 1:44 PM, Mariano Kamp <[email protected]>wrote: > >> Hi, >> >> I often see that services are killed and then "restarted". >> >> I can force this behavior when opening many applications. >> >> "Low Memory" or "OutOfMemory" are not problems per se, are they? This is >> just the normal behavior due to Android not closing applications, but >> killing the least important processes when more memory is needed, right? The >> terminology "crashed service" at least sounds very serious... >> >> D/dalvikvm( 112): GC freed 272 objects / 12256 bytes in 648ms >> D/dalvikvm( 55): GC freed 4021 objects / 156072 bytes in 897ms >> I/ActivityManager( 55): Process com.google.process.gapps (pid 1886) has >> died. >> W/ActivityManager( 55): Scheduling restart of crashed service >> com.google.android.apps.gtalkservice/com.google.android.gtalkservice.service.GTalkService >> in 5000ms >> I/ActivityManager( 55): Low Memory: No more background processes. >> I/ActivityManager( 55): Process com.tmobile.myfaves (pid 2156) has died. >> W/ActivityManager( 55): Scheduling restart of crashed service >> com.tmobile.myfaves/.MyFavesService in 5000ms >> I/ActivityManager( 55): Low Memory: No more background processes. >> >> >> >> D/LocationManager( 6830): removeUpdates: intent = PendingIntent{4318eb18 >> target android.os.binderpr...@4318e870} >> D/HTTPService( 5812): Calling: GET >> http://brightkite.com/me/config.jsonHTTP/1.1 >> W/InputManagerService( 55): Starting input on non-focused client >> com.android.internal.view.iinputmethodclient$stub$pr...@4333df90(uid=10016 >> pid=6825) >> W/InputManagerService( 55): Client not active, ignoring focus gain of: >> com.android.internal.view.iinputmethodclient$stub$pr...@43303ae0 >> W/ActivityManager( 55): Activity pause timeout for >> HistoryRecord{43593020 >> {com.android.vending/com.android.vending.AssetBrowserActivity}} >> D/dalvikvm( 5812): GC freed 1254 objects / 258832 bytes in 331ms >> I/WindowManager( 55): WIN DEATH: Window{4348c1b8 >> com.newsrob/com.newsrob.DashboardListActivity paused=false} >> I/ActivityManager( 55): Process com.newsrob (pid 6207) has died. >> W/ActivityManager( 55): Scheduling restart of crashed service >> com.newsrob/.SynchronizationService in 5000ms >> I/ActivityManager( 55): Low Memory: No more background processes. >> W/InputManagerService( 55): Window already focused, ignoring focus gain >> of: com.android.internal.view.iinputmethodclient$stub$pr...@43450e48 >> W/System.err( 6830): OutOfMemory >> D/dalvikvm( 5812): GC freed 181 objects / 190288 bytes in 625ms >> D/dalvikvm(10389): GC freed 114 objects / 5184 bytes in 679ms >> D/dalvikvm( 268): GC freed 12 objects / 368 bytes in 1096ms >> D/InetAddress( 6825): android.clients.google.com: 74.125.43.101 (family >> 2, proto 6) >> >> >> Is there any guaranteed call back available to clean up first before being >> killed? >> >> I set an ongoing notification when the service starts and clear it when it >> finishes. Unfortunately the notification isn't cleared when the service is >> just killed and it hangs around until the service is the next time >> triggered. >> >> Why are those services restarted? Are they always restarted? And what >> exactly happens when a service is restarted? Should I just clear the >> notification in the service's onCreate() method. >> To avoid the overhead of two processes I just use a >> single process for my UI and the service. Should I rework my code (stop >> sharing static variables) and use two separate processes? >> >> What are you guys doing in that situations? >> >> Cheers, >> Mariano >> > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

