title: how to send parcelable class in android
body: <p>I have gone through a lot of solutions on SO. But none of them work for me. I am simply trying to send a parcelable class from one Activity to another using </p>
  
  <pre><code>Bundle bundle = new Bundle();
  bundle.putParcelable("parcelableMovie", (Parcelable) movieItemArrayList.get(position));
  Intent intent = new Intent(BaseActivity.this, MovieDetailActivity.class);
  intent.putExtras(bundle);
  startActivity(intent);
  </code></pre>
  
  <p>I added a debugger point in <strong>MovieDetailActivity.onCreate</strong> and extras doesn't have anything. I tried changing my code in several ways. Like Casting <code>MovieItem</code> instead of <code>Parcelable</code></p>
  
  <p><strong>MovieDetailActivity.class</strong></p>
  
  <pre><code>Bundle extras = getIntent().getExtras();
  
  if (extras != null) {
      //movieItem = (MovieItem) getIntent().getParcelableExtra("name_of_extra");
  
      movieItem = (MovieItem) getIntent().getParcelableExtra("parcelableMovie");
  
      //movieItem = (MovieItem) extras.getParcelable("parcelableMovie");
      if (movieItem != null) {
          movieTitle.setText(movieItem.getName());
          releasingDate.setText(movieItem.getReleaseDate());
      }
  }
  </code></pre>
  
  <p>but movieItem always showing null</p>
  
  <p><strong>Edit</strong>
  <strong>MovieItem.java</strong></p>
  
  <pre><code>public class MovieItem implements Parcelable  {
  
      private String name;
      private String rating;
      private String releaseDate;
      private int image;
  
      public MovieItem(String name, String rating, String releaseDate, int image) {
          this.name = name;
          this.rating = rating;
          this.releaseDate = releaseDate;
          this.image = image;
      }
  
      public String getName() {
          return name;
      }
  
      public void setName(String name) {
          this.name = name;
      }
  
      public String getRating() {
          return rating;
      }
  
      public void setRating(String rating) {
          this.rating = rating;
      }
  
      public String getReleaseDate() {
          return releaseDate;
      }
  
      public void setReleaseDate(String releaseDate) {
          this.releaseDate = releaseDate;
      }
  
      public int getImage() {
          return image;
      }
  
      public void setImage(int image) {
          this.image = image;
      }
  
      @Override
      public int describeContents() {
          return 0;
      }
  
      @Override
      public void writeToParcel(Parcel dest, int flags) {
          dest.writeString(this.name);
          dest.writeString(this.rating);
          dest.writeString(this.releaseDate);
          dest.writeInt(this.image);
      }
  
      protected MovieItem(Parcel in) {
          this.name = in.readString();
          this.rating = in.readString();
          this.releaseDate = in.readString();
          this.image = in.readInt();
      }
  
      public static final Creator&lt;MovieItem&gt; CREATOR = new Creator&lt;MovieItem&gt;() {
          @Override
          public MovieItem createFromParcel(Parcel source) {
              return new MovieItem(source);
          }
  
          @Override
          public MovieItem[] newArray(int size) {
              return new MovieItem[size];
          }
      };
  }
  </code></pre>