title: Boot completed broadcast receiver context parameter
body: <p>I am working on a service that can start at device boot completion, i am setting a preference file to store service running state so i can retrieve it when i need it, in my broadcast receiver :</p>
  
  <pre><code>public class MyServiceBootReceiver extends BroadcastReceiver {
  public MyServiceBootReceiver() {super();}
  
  @Override
  public void onReceive(Context context, Intent intent) {
      if(intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)) {
          if(MyService.isRunning(context)) //static method to get shared preferences value
          context.startService(new Intent(context, MyService.class));
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Now i am confused about the "context" parameter in onReceive() method, since the application and all its components will be destroyed when device is shutdown, which context is passed in the receiver, and wich component of my application is actually receiving it ?</p>