title: sending bundle to another activity
body: <p>I am trying to send a bundle from one activity to another.  When I load the bundle in the recieving activity all the information seems to be null. Here is some code:</p>
  
  <p>Activity A (sending bundle):</p>
  
  <pre><code>public void onItemClick(AdapterView&lt;?&gt; arg0, View arg1, int position, long arg3) {
                  Intent intent = new Intent(HotelsActivity.this, EditHotelActivity.class);
                  Bundle b = new Bundle();
                  b = toBundle(app.getHotelList().get(position));
                  intent.putExtra("Hotel Bundle", b);
                  startActivity(intent);
              }
  
              });
  </code></pre>
  
  <p>the toBundle method is just adding strings from an object into the bundle. I have put logging statements in this method and the bundle is definately not null.</p>
  
  <p>Activity B (loading the bundle):</p>
  
  <pre><code>public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView (R.layout.edit_hotel);
          setTitleFromActivityLabel (R.id.title_text);
  
          // Retrieve sent bundle
          Bundle b = this.getIntent().getExtras();
          String hotelName = b.getString("hotelname");
          if (hotelName == null)
              MyLog.i(TAG, "IT IS NULL");
      }
  </code></pre>
  
  <p>The loggin statement then prints "IT IS NULL" because for some reason hotelName is null but that is definately the correct key.  </p>
  
  <p>Can anyone help with this?</p>
  
  <p>toBundle method:</p>
  
  <pre><code>public Bundle toBundle(HotelItem hotel) {
          Bundle b = new Bundle();
          b.putString("hotelname",hotel.getHotelName());
          b.putString("hotel address", hotel.getHotelAddress());
          b.putString("hotel telephone", hotel.getHotelTelephone());
          b.putString("hotel website", hotel.getHotelWebsite());
  
  
          return b;
      }
  </code></pre>