title: Change Fragment from Broadcast Receiver?
body: <p>I am trying to update a fragment in my activity from a static broadcast receiver - but it doesnt work</p>
  
  <pre><code>public static class NetworkChangeReceiver extends BroadcastReceiver {
  
          @Override
          public void onReceive(final Context context, final Intent intent) {
  
  
             FragmentManager fm = getFragmentManager();
  
              FragmentTransaction fragmentTransaction = fm.beginTransaction();
  
              fragmentTransaction.replace(R.id.container, new Fragment1());
  
              fragmentTransaction.commit();
  
  
          }
      }
  </code></pre>
  
  <p>there is a problem about getFragmentManager():</p>
  
  <p>Cannot make a static reference to the non-static method getFragmentManager() from the type Activity</p>