Automatically restart a Service when the apk crashes
<p>I want to restart my Service automatically if the application crashes. My ideas are:</p>

<p>1:
a BroadcastReceiver when the apk crashes and automatic restart the Service</p>

<pre><code>if("android.intent.action.SOMETHING".equals(intent.getAction()))
  {
     Intent serviceLauncher = new Intent(context, Service.class);
     context.startService(serviceLauncher);
  }
</code></pre>

<p>2: 
with an uncaughtException(), but i dont know to handle that</p>
