title: Android - implementing startForeground for a service?
body: <p>So I'm not sure where/how to implement this method to make my service run in the foreground. Currently I start my service by the following in another activity: </p>
  
  <pre><code>Intent i = new Intent(context, myService.class); 
  context.startService(i);
  </code></pre>
  
  <p>And then in myServices' onCreate() I try the startForeground()...? </p>
  
  <pre><code>Notification notification = new Notification();
  startForeground(1, notification);
  </code></pre>
  
  <p>So yeah I'm a bit lost and unsure of how to implement this.</p>