title: Using intents to pass data between activities
body: <p>I am trying to pass the data between Activities</p>
  
  <p>I use intents to pass data between regular activities</p>
  
  <p>consider the code below::</p>
  
  <p><code>AndroidTabRestaurantDescSearchListView.java</code></p>
  
  <pre><code>public class AndroidTabRestaurantDescSearchListView extends TabActivity {
  
      // TabSpec Names
      private static final String INBOX_SPEC = "Rating";
      private static final String OUTBOX_SPEC = "Price";
  
      Button Photos;
      Button Filter;
      Button Search;
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
  
          TabHost tabHost = getTabHost();
  
          // Inbox Tab
          TabSpec inboxSpec = tabHost.newTabSpec(INBOX_SPEC);
          Intent inboxIntent = new Intent(this, RatingDescriptionSearchActivity.class);
          inboxSpec.setIndicator(INBOX_SPEC);
          // Tab Content
          inboxSpec.setContent(inboxIntent);
  
          // Outbox Tab
          TabSpec PriceSpec = tabHost.newTabSpec(OUTBOX_SPEC);
          Intent PriceIntent = new Intent(this, PriceDescriptionSearchActivity.class);
          PriceSpec .setIndicator(OUTBOX_SPEC);
          PriceSpec.setContent(PriceIntent);
  
  
          // Adding all TabSpec to TabHost
          tabHost.addTab(inboxSpec); 
          tabHost.addTab(PriceSpec); 
  
          //Set the current value tab to default first tab
          tabHost.setCurrentTab(0);
  
      }
  
  }
  </code></pre>
  
  <hr>
  
  <p>Suppose i send data from Someother activity called <code>Activity-1</code> to <code>AndroidTabRestaurantDescSearchListView</code> as intents </p>
  
  <p>Now how can i recieve the data in <code>AndroidTabRestaurantDescSearchListView</code> which i got from <code>Activity-1</code> and then again pass it into <code>RatingDescriptionSearchActivity</code></p>
  
  <p><strong>Pictoral representation is</strong> ::</p>
  
  <p><img src="https://i.stack.imgur.com/gsguN.png" alt="enter image description here"></p>
  
  <p><strong>{EDIT}</strong> -- If this is possible based on answers --- Ambiguity because AndroidTabRestaurantDescSearchListView is a tab activity</p>
  
  <pre><code>TabSpec inboxSpec = tabHost.newTabSpec(INBOX_SPEC);
          Intent inboxIntent = new Intent(this, RatingDescriptionActivity.class);
          intent.putExtra("keyName", value);
          inboxSpec.setIndicator(INBOX_SPEC);
          // Tab Content
          inboxSpec.setContent(inboxIntent);
  </code></pre>