title: Snackbar doesn't appear again after Re-Opening the App
body: <p>My Application looks for the Connectivity-State using a Broadcastlistener.
  If the Phone is offline, a Snackbar should appear. The Snackbar has an Action, to Open the Networksettings.</p>
  
  <p>If I click on this, my Networksettings were opened. If I don't turn on my Internet and go back to the App, my Snackbar isn't shown again though it is called (Checked it!).</p>
  
  <p>If I set the Snackbar to null and initialise it again, it works!</p>
  
  <p>MainActivity:</p>
  
  <pre><code>@Override
  protected void onResume() {
      super.onResume();
  
      registerReceiver(networkListener, new IntentFilter("android.net.conn.CONNECTIVITY_CHANGE"));
  }
  
  @Override
  protected void onPause() {
      super.onPause();
  
      unregisterReceiver(networkListener);
  }
  
  @Override
  public void ToggleSnackbar(boolean ShowHide) {
  if (ShowHide) {
      snbInternetState.show();
  }
  else {
      snbInternetState.dismiss();
  }
  
      bOnline = ShowHide;
  }
  </code></pre>
  
  <p>NetworkListener:</p>
  
  <pre><code>public class NetworkListener extends BroadcastReceiver {
  
      private SnackbarInterface snbInterface;
  
      public NetworkListener(SnackbarInterface snbInterface) {
          this.snbInterface = snbInterface;
      }
  
      @Override
      public void onReceive(Context context, Intent intent) {
          ConnectivityManager cm = (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE);
          NetworkInfo ni = cm.getActiveNetworkInfo();
  
          if (ni == null || !ni.isConnectedOrConnecting()) {
              snbInterface.ToggleSnackbar(true);
          }
          else if (ni != null &amp;&amp; ni.isConnected()) {
              snbInterface.ToggleSnackbar(false);
          }
      }
  
      public interface SnackbarInterface {
          void ToggleSnackbar(boolean ShowHide);
      }
  }
  </code></pre>
  
  <p>Does anybody know how to fix this problem?</p>
  
  <p>Thanks!</p>