Remove notification when service destroyed by android OS
<p>I created an app which shows Notification when <code>Service.onStartCommand()</code> method executed and hide notification when <code>Service.onDestroy()</code> is called. Its works fine for normal calls to startService() and stopService().</p>

<p><strong>Service Code:</strong></p>

<pre><code>@Override
public IBinder onBind(Intent intent) 
{
    return null;
}
@Override
public void onCreate() 
{
    super.onCreate();
    nm = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
}

@Override
public int onStartCommand(Intent intent, int flags, int startId)
{
    //Some  code here
    showNotification();
    return START_NOT_STICKY; 
}

@Override
public void onDestroy() 
{
    super.onDestroy();
    nm.cancel(R.string.service_started);
}
</code></pre>

<p><strong>Problem:</strong> When my service is destroyed by android OS() (In case when <code>onDestroy()</code> not called) then notification not removed. So how to remove notification when Service is destroyed by android OS itself?</p>
