title: Got Null value during passing data from fragments to Activity
body: <p>I'm working with fragments and encounter with a following problem :</p>
  
  <ol>
  <li>While passing data from fragments i used bundle to pass integer
  values and sending them through intent.</li>
  <li>I'm calling them by using intent .</li>
  <li>But while i'm printing then i'm getting only <strong>Null</strong> values.</li>
  </ol>
  
  <p>From <code>fragment</code>:</p>
  
  <pre><code>Bundle bundle = new Bundle();
  bundle.putInt("myData", x);
  Intent in=new Intent(getActivity(),B.class);
  in.putExtra("xy", bundle);
  startActivity(in);
  </code></pre>
  
  <p>In <code>Activity</code>:</p>
  
  <pre><code>Intent in=getIntent();
  Bundle bundle = getIntent().getExtras();
  int value = bundle.getInt("myData");
  Log.v("in mainactivity",""+value);
  </code></pre>
  
  <p>Here it getting Null values.
  I hope u understand the problem.</p>