Searching starting-method, if Android starts my proc
<p>I have created an app with a service running as a background-thread of my app.
From time to time Andrdoid kills some apps, due to low memory.
One of these apps, which has been killed, was my application:</p>

<blockquote>
  <blockquote>
    <p>07-29 14:48:35.140 I/ActivityManager(  145): Process test.myApp (pid 4847) has died.</p>
    
    <p>07-29 14:48:35.140 W/ActivityManager(  145): Scheduling restart of crashed service test.myApp/.hilfsklassen.AutoSyncService in 19600ms</p>
    
    <p>07-29 14:48:35.140 I/WindowManager(  145): WIN DEATH: Window{4071e300 test.myApp/test.myApp.Login paused=false}</p>
    
    <p>07-29 14:48:35.150 I/WindowManager(  145): WIN DEATH: Window{407def28 test.myApp/test.myApp.Startseite paused=false}</p>
  </blockquote>
</blockquote>

<p>Android started my app some seconds later:</p>

<blockquote>
  <blockquote>
    <p>07-29 14:48:54.750 I/ActivityManager(  145): Start proc test.myApp for service test.myApp/.hilfsklassen.AutoSyncService: pid=7299 uid=10057 gids={3003}</p>
  </blockquote>
</blockquote>

<p>But there is one problem:<br><br>
My Service needs some data from test.myApp for running.<br>So I have know <b>what method of my start-activity will be called, if Android starts my app??</b><br><br>I have tried onResume(), but this only works, if my app has the focuse (Foreground). If Android starts my app, it runs in the Background. So I thought it must be onRestart(), but this method was not be called. 
I have to start my service within this method in order to set some variables which are needed for running the service!</p>

<p>Chris</p>
