title: How to get the getArguments data from a fragment?
body: <p>I am using a fragment for my application.and I also add a bundle into my fragments but when I want to get the added String from the bundle the compiler shows me a null pointer error  like as follows </p>
  
  <pre><code>Process: com.softmaker.gazi_opu.personalhealthcare, PID: 3253
      java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toString()' on a null object reference
              at com.softmaker.gazi_opu.personalhealthcare.fragment.GeneralInformationFragment.setValue(GeneralInformationFragment.java:67)
              at com.softmaker.gazi_opu.personalhealthcare.fragment.GeneralInformationFragment.onCreateView(GeneralInformationFragment.java:59)
              at android.support.v4.app.Fragment.performCreateView(Fragment.java:1789)
              at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:955)
              at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1138)
              at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:740)
              at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1501)
              at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:458)
              at android.os.Handler.handleCallback(Handler.java:739)
              at android.os.Handler.dispatchMessage(Handler.java:95)
              at android.os.Looper.loop(Looper.java:135)
              at android.app.ActivityThread.main(ActivityThread.java:5254)
              at java.lang.reflect.Method.invoke(Native Method)
              at java.lang.reflect.Method.invoke(Method.java:372)
              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
  </code></pre>
  
  <p>And my added code and getting the added data code are given bellow</p>
  
  <pre><code>public static GeneralInformationFragment getInstance(String profileID){
          Bundle bundle = new Bundle();
          bundle.putString("profileId",profileID);
          GeneralInformationFragment generalFragment = new GeneralInformationFragment();
          generalFragment.setArguments(bundle);
          return generalFragment;
      }
  </code></pre>
  
  <p>Now for getting data from the this fragment within onCreateMethod</p>
  
  <pre><code>String id = getArguments().getString("profileId");
          Log.e("ID :", "" + id.toString());
  </code></pre>
  
  <p>Can anyone suggest me. where am I making mistake ?</p>