title: Parcel: unable to marshal value - Fragments
body: <p>my app crashes when I try to launch navigation on browser. I've read something about implement Parcelable (<a href="https://stackoverflow.com/questions/18960120/android-parcel-in-viewpager">here</a>), but I don't have any idea on how to do it. </p>
  
  <p>This is the first time I work with Fragments and they are a PIA. I've modified <a href="https://github.com/iamjayanth/FragmentTabStudy" rel="nofollow noreferrer">this project</a> by adding two more tabs. </p>
  
  <p>The error I got: 
  LogCat:</p>
  
  <pre><code>    11-14 13:37:22.867: E/AndroidRuntime(671): FATAL EXCEPTION: main
  11-14 13:37:22.867: E/AndroidRuntime(671): java.lang.RuntimeException: Parcel: unable to marshal value AppTabAFirstFragment{414df8c8 #0 id=0x1010000}
  11-14 13:37:22.867: E/AndroidRuntime(671):  at android.os.Parcel.writeValue(Parcel.java:1235)
  11-14 13:37:22.867: E/AndroidRuntime(671):  at android.os.Parcel.writeList(Parcel.java:622)
  11-14 13:37:22.867: E/AndroidRuntime(671):  at android.os.Parcel.writeValue(Parcel.java:1195)
  11-14 13:37:22.867: E/AndroidRuntime(671):  at android.os.Parcel.writeMapInternal(Parcel.java:591)
  11-14 13:37:22.867: E/AndroidRuntime(671):  at android.os.Parcel.writeMap(Parcel.java:575)
  11-14 13:37:22.867: E/AndroidRuntime(671):  at android.os.Parcel.writeValue(Parcel.java:1166)
  11-14 13:37:22.867: E/AndroidRuntime(671):  at android.os.Parcel.writeMapInternal(Parcel.java:591)
  11-14 13:37:22.867: E/AndroidRuntime(671):  at android.os.Bundle.writeToParcel(Bundle.java:1619)
  11-14 13:37:22.867: E/AndroidRuntime(671):  at android.os.Parcel.writeBundle(Parcel.java:605)
  11-14 13:37:22.867: E/AndroidRuntime(671):  at android.app.ActivityManagerProxy.activityStopped(ActivityManagerNative.java:2078)
  11-14 13:37:22.867: E/AndroidRuntime(671):  at android.app.ActivityThread$StopInfo.run(ActivityThread.java:2874)
  11-14 13:37:22.867: E/AndroidRuntime(671):  at android.os.Handler.handleCallback(Handler.java:615)
  11-14 13:37:22.867: E/AndroidRuntime(671):  at android.os.Handler.dispatchMessage(Handler.java:92)
  11-14 13:37:22.867: E/AndroidRuntime(671):  at android.os.Looper.loop(Looper.java:137)
  11-14 13:37:22.867: E/AndroidRuntime(671):  at android.app.ActivityThread.main(ActivityThread.java:4745)
  11-14 13:37:22.867: E/AndroidRuntime(671):  at java.lang.reflect.Method.invokeNative(Native Method)
  11-14 13:37:22.867: E/AndroidRuntime(671):  at java.lang.reflect.Method.invoke(Method.java:511)
  11-14 13:37:22.867: E/AndroidRuntime(671):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
  11-14 13:37:22.867: E/AndroidRuntime(671):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
  11-14 13:37:22.867: E/AndroidRuntime(671):  at dalvik.system.NativeStart.main(Native Method)
  </code></pre>
  
  <p>App Manifest:</p>
  
  <pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.lupradoa.lakari"
      android:versionCode="1"
      android:versionName="1.0"&gt;
       &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  
      &lt;uses-sdk android:minSdkVersion="8" android:targetSdkVersion="19" /&gt;
  
      &lt;application android:label="@string/app_name"
          android:icon="@drawable/ic_launcher"
          android:theme="@style/AppTheme"
          android:allowBackup ="false"&gt;
  
          &lt;activity android:name="com.lupradoa.lakari.base.AppMainTabActivity" &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
      &lt;intent-filter&gt;       
      &lt;action android:name="android.intent.action.SEND" /&gt;
      &lt;category android:name="android.intent.category.DEFAULT" /&gt;
    &lt;/intent-filter&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>Code where I got the error:
  FragmentA.java:</p>
  
  <pre><code>    package com.lupradoa.lakari.fragmenttabstudy.tabA;
  
  import java.io.IOException;
  import java.io.InputStream;
  import java.net.HttpURLConnection;
  import java.net.URL;
  import java.net.URLConnection;
  
  import android.content.ActivityNotFoundException;
  import android.content.Intent;
  import android.graphics.Bitmap;
  import android.graphics.BitmapFactory;
  import android.net.Uri;
  import android.os.AsyncTask;
  import android.os.Bundle;
  import android.util.Log;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.View.OnClickListener;
  import android.view.ViewGroup;
  import android.widget.Button;
  import android.widget.ImageView;
  
  import com.lupradoa.lakari.R;
  import com.lupradoa.lakari.base.BaseFragment;
  
  public class AppTabAFirstFragment extends BaseFragment {
      private Button mGotoButton;
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
              Bundle savedInstanceState) {
          View view       =   inflater.inflate(R.layout.app_tab_a_first_screen, container, false);
  
          mGotoButton =   (Button) view.findViewById(R.id.goToShop);
          mGotoButton.setOnClickListener(listener);
  
          return view;
      }
  
      private OnClickListener listener        =   new View.OnClickListener(){
          @Override
  
          public void onClick(View v) {
              Intent navigation = new Intent(Intent.ACTION_VIEW, Uri.parse("http://maps.google.com/maps?f=d&amp;daddr=42.338803,-7.863178"));
  
              navigation.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
              try{ 
                  startActivity(navigation);
              }catch(ActivityNotFoundException anf){
                  Log.w(TAG, "Navigation not installed");
              }
          }
      };
  
  
      /*
      public static class MyParcelable implements Parcelable {
          private int mData;
  
          public int describeContents() {
              return 0;
          }
  
          public void writeToParcel(Parcel out, int flags) {
              out.writeInt(mData);
          }
  
          public static final Parcelable.Creator&lt;MyParcelable&gt; CREATOR
                  = new Parcelable.Creator&lt;MyParcelable&gt;() {
              public MyParcelable createFromParcel(Parcel in) {
                  return new MyParcelable(in);
              }
  
              public MyParcelable[] newArray(int size) {
                  return new MyParcelable[size];
              }
          };
  
          private MyParcelable(Parcel in) {
              mData = in.readInt();
          }
      }
    */
  
  }
  </code></pre>
  
  <p>At the bottom is the "typical implementation" of Parcelable according to <a href="http://developer.android.com/reference/android/os/Parcelable.html" rel="nofollow noreferrer">Android Reference</a>, but after looking in the internet for some samples, I wasn't able to implement it.</p>
  
  <p>Can anybody help me, please? </p>