title: How to start Fragment from an Activity
body: <p>I already want to start my RecipientFragment from my MainActivity and pass data onto the Fragment from my MainActivity. Here is the code that I have implemented. But the fragment does not start.</p>
  
  <pre><code>Bundle bundle = new Bundle();
  bundle.putString(ParseConstants.KEY_FILE_TYPE, fileType);
  RecipientsFragment keyfile = new RecipientsFragment();
  keyfile.setArguments(bundle);
  Fragment newFragment = new RecipientsFragment();
  FragmentTransaction transaction = getFragmentManager().beginTransaction();
  transaction.commit();
  </code></pre>
  
  <p>I also want to know how to pass intent.setData and get that data in Fragment. Currently I have below code:</p>
  
  <p>RecipientFragment</p>
  
  <pre><code>mMediaUri = getActivity().getIntent().getData();
  </code></pre>
  
  <p>MainActivity</p>
  
  <pre><code>Intent recipientsIntent = new Intent(this, RecipientsFragment.class);
          recipientsIntent.setData(mMediaUri);
  </code></pre>