title: Unmarshalling unknown type code
body: <p>What I am basically trying to do is pass a Parcelable object as an Intent extra.</p>
  
  <p>Here is where I pass it,</p>
  
  <pre><code>final Intent intent = new Intent(_context,
                      AddReminderActivity.class);
  
              final Bundle bundle = new Bundle();
              bundle.putString(AddReminderActivity.EXTRA_MODE, AddReminderActivity.MODE_EDIT);
              bundle.putParcelable(AddReminderActivity.EXTRA_REMINDER, _reminders.get(position));
  
              intent.putExtras(bundle);
              _context.startActivity(intent);
  </code></pre>
  
  <p><code>_reminders</code> is an <code>ArrayList&lt;Reminder&gt;</code></p>
  
  <p>Here is my <code>Reminder</code> class</p>
  
  <pre><code>package au.com.elegantmedia.vetcheck.objects;
  
  import android.os.Parcel;
  import android.os.Parcelable;
  
  
  public class Reminder implements Parcelable {
  
      private long _id;
      private String _message = "n/a";
      private String _medication = "n/a";
      private String _dosage = "n/a";
      private String _date = "n/a";
      private String _time = "n/a";
      private int _repeatID = 0;  // 1-once, 2-hourly, 3-daily, 4-weekly, 5-monthly
      private String _repeat = "n/a";
      private int _requestCode = 0;
  
      private static int REPEAT_ID_ONCE = 1;
      private static String REPEAT_ONCE = "once";
      private static int REPEAT_ID_HOURLY = 2;
      private static String REPEAT_HOURLY = "hourly";
      private static int REPEAT_ID_DAILY = 3;
      private static String REPEAT_DAILY = "daily";
      private static int REPEAT_ID_WEEKLY = 4;
      private static String REPEAT_WEEKLY = "weekly";
      private static int REPEAT_ID_MONTHLY = 5;
      private static String REPEAT_MONTHLY = "monthly";
  
      public Reminder() {
          // TODO Auto-generated constructor stub
      }
  
      public Reminder(Parcel source) {
          _id = source.readInt();
          _message = source.readString();
          _medication = source.readString();
          _dosage = source.readString();
          _date = source.readString();
          _time = source.readString();
          _repeatID = source.readInt();
          _repeat = source.readString();
          _requestCode = source.readInt();
      }
  
      public long getID() {
          return _id;
      }
  
      public void setID(long id) {
          _id = id;
      }
  
      public String getMessage() {
          return _message;
      }
  
      public void setMessage(String message) {
          if(!message.equals("")) {
              _message = message;
          }
      }
  
      public String getMedication() {
          return _medication;
      }
  
      public void setMedication(String medication) {
          if(!medication.equals("")) {
              _medication = medication;
          }
      }
  
      public String getDosage() {
          return _dosage;
      }
  
      public void setDosage(String dosage) {
          if(!dosage.equals("")) {
              _dosage = dosage;
          }
      }
  
      public String getDate() {
          return _date;
      }
  
      public void setDate(String date) {
          if(!date.equals("")) {
              _date = date;
          }
      }
  
      public String getTime() {
          return _time;
      }
  
      public void setTime(String time) {
          if(!time.equals("")) {
              _time = time;
          }
      }
  
      public void setRepeatID(String repeat) {
          if(repeat.equals(REPEAT_ONCE)) {
              _repeatID = REPEAT_ID_ONCE;
          }
          else if(repeat.equals(REPEAT_HOURLY)) {
              _repeatID = REPEAT_ID_HOURLY;
          }
          else if(repeat.equals(REPEAT_DAILY)) {
              _repeatID = REPEAT_ID_DAILY;
          }
          else if(repeat.equals(REPEAT_WEEKLY)) {
              _repeatID = REPEAT_ID_WEEKLY;
          }
          else if(repeat.equals(REPEAT_MONTHLY)) {
              _repeatID = REPEAT_ID_MONTHLY;
          }
      }
  
      public int getRepeatID() { 
          return _repeatID;
      }
  
      public void setRepeat(int repeatID) {
          _repeatID = repeatID;
  
          if(repeatID == REPEAT_ID_ONCE) {
              _repeat = REPEAT_ONCE;
          }
          else if(repeatID == REPEAT_ID_HOURLY) {
              _repeat = REPEAT_HOURLY;
          }
          else if(repeatID == REPEAT_ID_DAILY) {
              _repeat = REPEAT_DAILY;
          }
          else if(repeatID == REPEAT_ID_WEEKLY) {
              _repeat = REPEAT_WEEKLY;
          }
          else if(repeatID == REPEAT_ID_MONTHLY) {
              _repeat = REPEAT_MONTHLY;
          }
      }
  
      public String getRepeat() {
          return _repeat;
      }
  
      public void setRequestCode(int requestID) {
          _requestCode = requestID;
      }
  
      public int getRequestCode() {
          return _requestCode;
      }
  
      // parceling part
      public static final Parcelable.Creator&lt;Reminder&gt; CREATOR = new Parcelable.Creator&lt;Reminder&gt;() {
  
          @Override
          public Reminder createFromParcel(Parcel source) {
              return new Reminder(source);
          }
  
          @Override
          public Reminder[] newArray(int size) {
              return new Reminder[size];
          }
      };
  
      @Override
      public int describeContents() {
          return 0;
      }
  
      @Override
      public void writeToParcel(Parcel dest, int flags) {
          dest.writeLong(_id);
          dest.writeString(_message);
          dest.writeString(_medication);
          dest.writeString(_dosage);
          dest.writeString(_date);
          dest.writeString(_time);
          dest.writeInt(_repeatID);
          dest.writeInt(_requestCode);
      }
  }
  </code></pre>
  
  <p>The problem I'm having is that when passing the bundle from the caller activity it is like this,</p>
  
  <pre><code>Bundle[{reminder=au.com.elegantmedia.vetcheck.objects.Reminder@41fade98, mode=edit}]
  </code></pre>
  
  <p>meaning everything is set as expected, but when trying to access the extras from the callee activity (<code>final Bundle bundle = getIntent().getExtras();</code>) it is as follows,</p>
  
  <pre><code>Bundle[mParcelledData.dataSize=308]
  </code></pre>
  
  <p>and at the point I try to access the bundle as follows,</p>
  
  <pre><code>if(bundle.getString(EXTRA_MODE).equals(MODE_ADD)) {
  
          }
          else if(bundle.getString(EXTRA_MODE).equals(MODE_EDIT)) {
              final Reminder reminder = getIntent().getParcelableExtra(EXTRA_REMINDER);
              populateData(reminder);
          }
  </code></pre>
  
  <p>I run into the following Exception</p>
  
  <pre><code>E/AndroidRuntime(17991): Caused by: java.lang.RuntimeException: Parcel android.os.Parcel@416ee8b0: Unmarshalling unknown type code 6357102 at offset 172
  </code></pre>
  
  <p>This is my first attempt on Parcelable objects so I have very little idea what this means and Googling for a couple of hours hasn't exactly helped to narrow down the problem.</p>