title: How to use getIntent.getExtra() in tab fragment
body: <p>currently i doing an android app which need to connect and use tab to show different categories of product. In activity, i able to run the code below to get extra but cannot run in tab fragment. In tab fragment, the function class for showDialogBox,getExtra and isNetworkConnected() cannot run. I use the AppBarLayout example that show in <a href="http://saulmm.github.io/mastering-coordinator/" rel="nofollow">http://saulmm.github.io/mastering-coordinator/</a> and some addition code. Tq.</p>
  
  <pre><code>try { getExtra(savedInstanceState);
          if (!isNetworkConnected()) {
              if(language == 0)
                  showDialogBox("Dashboard","No internet connection, please turn on your network connection");
              else if(language == 1)
                  showDialogBox("主页","无法上网, 请打开网路.");
              else
                  showDialogBox("Papan Pemuka","Tiada internet, sila buka sambungan internet anda");
              this.finish();
              return;
          }
          //some code here
          new Thread(new Runnable() {
              @Override
              public void run() {
                  try {
                     //some code here
                  } catch (Exception ex) {
  
                  }
              }
          }).start();
  
      } catch (Exception ex) {}
  
  private void showDialogBox(String title, String message) {
      AlertDialog.Builder builder = new AlertDialog.Builder(this);
      builder.setMessage(message).setTitle(title);
      builder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
          // @Override
          public void onClick(DialogInterface dialog, int which) {
              dialog.dismiss();
          }
      });
      AlertDialog alert = builder.create();
      alert.show();
  }
  
  private void getExtra(Bundle savedInstanceState) {
      // get params frm previous page/////
      if (savedInstanceState == null) {
          Bundle extras = getIntent().getExtras();
          if (extras != null) {
              custID = extras.getString("CUSID");
          }
      }
  }
   private boolean isNetworkConnected() {
      ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
      NetworkInfo ni = cm.getActiveNetworkInfo();
      if (ni == null) {
          Toast.makeText(getApplicationContext(), "No Network Connection.", Toast.LENGTH_LONG).show();
          return false;
      } else
          return true;
  }
  </code></pre>