title: Pass data between two activities in android using Intents
body: <p>I have the following code in a Custom Array Adapter where I use a button click event to start another activity. The Array adapter is in a different package and the activity which I want to start is in a different package.</p>
  
  <pre><code>public void onClick(View v) {
              int position = (Integer) v.getTag();
              String savedName = getByIndex(assignments, position).getSavingName();
              Intent markingViewIntent = new Intent("com.it.AssignmentMarkingFragment.intent.action.Launch");
              markingViewIntent.putExtra("assignment", savedName);
              v.getContext().startActivity(markingViewIntent);
          }
  </code></pre>
  
  <p>Following is my manifest file.</p>
  
  <pre><code>&lt;activity android:name="com.it.AssignmentMarkingFragment"&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="com.it.AssignmentMarkingFragment.intent.action.Launch" /&gt;
              &lt;category android:name="android.intent.category.DEFAULT" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  </code></pre>
  
  <p>This is how I am getting the data from the other activity inside onCreate().</p>
  
  <pre><code>Bundle extras = getIntent().getExtras();
  String name = extras.getString("assignment");
  </code></pre>
  
  <p>But the value of name is always null. Can anyone figure out what I'm doing wrong here. Thanks in advance!</p>