title: Send two strings from fragment to fragment
body: <p>I don't understand how to transfer data between two fragments. I've tried this:</p>
  
  <pre><code>public class Connection extends Fragment
  {
   SendMessage sender;
   public interface SendMessage
  {
   public void send(String one, String two);
  }
  public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState)
  {
    //my data  
  }
  public void onActivityCreated(Bundle savedInstanceState)
  {
      super.onActivityCreated(savedInstanceState);
      send = (SendMessage) getActivity();
  }
  
  private class AlarmReceiver extends BroadcastReceiver
  {
      public void onReceive(final Context context, Intent intent)
      {
        if(message.equals("POS"))
        {
         sender.send(position,id);
        }
      }
    }
  </code></pre>
  
  <p>in the first fragment; in the MainActivity:</p>
  
  <pre><code>public class MainActivity extends FragmentActivity implements      Connection.SendMessage
  {
   protected void onCreate(Bundle savedInstanceState)
   {  
    //my code
   }
  
    @Override
    public void send(String one, String two) 
    {
     Map map = new Map();
     final Bundle bundle = new Bundle(); 
     bundle.putString("Position",one);
     bundle.putString("ID:",two);
     map.setArguments(bundle);
    }
  }
  </code></pre>
  
  <p>and in the Map fragment(it need to receive this data):</p>
  
  <pre><code>public class Map extends Fragment
  {
   public View onCreateView(final LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
  { 
   Bundle bundle = new Bundle();
   bundle.getArguments();
  
   if (bundle != null)
   {
    String pos = bundle.getString("Position");
    String id = bundle.getString("ID");
   }
    //then show this on googleMaps
   }
  }
  </code></pre>
  
  <p>but I don't understand why this code doesn't work..could you help me? thanks...</p>