title: When exactly onReceive from BroadcastReceiver is called?
body: <p>I know that <code>onReceive</code> from <code>BroadcastReceiver</code> is called on the main thread (UI). Does it mean that my all methods like <code>onStart</code>, <code>onDestroy</code>, <code>onClick()</code> etc have to be finished before <code>onReceive</code> will be called? Or can <code>onReceive</code> be called while I'm for example in the middle of <code>onStart</code> method, like this:</p>
  
  <pre><code>@Override
  protected void onStart() {
          if (networkChangeReceiver != null) {
              IntentFilter intentFilter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION);
              context.registerReceiver(networkChangeReceiver, intentFilter);
          }
          method1();
          //here connection changes -&gt; can onReceive be called here?
          method2();
          method3();
          (...)
  
  }
  </code></pre>