Android - how to close notification in service started by startForeground?
<p>Say I start a notification via the following in a service of my app:</p>

<pre><code>notification = new Notification(R.drawable.icon, getText(R.string.app_name), System.currentTimeMillis());
      Intent notificationIntent = new Intent(this, mainActivity.class);
      PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0);
      initService.notification.setLatestEventInfo(this, getText(R.string.app_name), "ibike rider", pendingIntent);

      startForeground(ONGOING_NOTIFICATION, notification);
</code></pre>

<p>How would I go about <code>shutting down/cancelling</code> this service? And would it be possible to do this in another activity? </p>

<p>Thanks.</p>
