title: Android - Context in Parcelable Class
body: <p>I have the following in a class that is implementing Parcelable:</p>
  
  <pre><code>private static final long serialVersionUID = 66;
  private HashMap&lt;Integer, Bitmap&gt; mBitmaps;
  private HashMap&lt;Integer, Drawable&gt; mDrawables;
  private Context mContext;
  </code></pre>
  
  <p>And:</p>
  
  <pre><code>@Override
  public void writeToParcel(Parcel dest, int flags) {
      // TODO Auto-generated method stub
      dest.writeValue(mBitmaps);
      dest.writeValue(mDrawables);
      dest.writeValue(mContext);
      dest.writeByte((byte) (mActive ? 0x01 : 0x00));
  
  }
  </code></pre>
  
  <p>I get the error:</p>
  
  <pre><code>java.lang.RuntimeException: Parcel: unable to marshal value android.app.Application@4051cfe0
  at android.os.Parcel.writeValue(Parcel.java:1132)
  at com.example.example.ImageManager.writeToParcel(ImageManager.java:82)
  
  
  dest.writeValue(mContext); is on line 82.
  </code></pre>