2

I know that this a looks duplicate thread. But, I could not find the solution for this..

I have a application in which I try to a Intent filter for

android.intent.action.VIEW

When I touch on a email-id, it opens my activity. But throws BadParcelableException: unmarshalling: com.android.mail.providers.Account.

I tried setting the ClassLoader to the bundle. But did not work.

Bundle bundle = getIntent().getExtras() ;
bundle.setClassLoader(getClassLoader()) ;

As per the other posts they just say getClass().getClassLoader().

My Question is what should be the value for class loader?

Kindly, point me to the right direction.

Thanks in advance.

Stack trace:

android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.android.mail.providers.Account
    at android.os.Parcel.readParcelable(Parcel.java:2077)
    at android.os.Parcel.readValue(Parcel.java:1965)
    at android.os.Parcel.readMapInternal(Parcel.java:2226)
    at android.os.Bundle.unparcel(Bundle.java:223)
    at android.os.Bundle.getBoolean(Bundle.java:802)
    at android.content.Intent.getBooleanExtra(Intent.java:4354)
    at com.example.activities.HandleView.access$0(SourceFile:225)
    at com.example.activities.HandleView$1.handleMessage(SourceFile:1010)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:153)
    at android.app.ActivityThread.main(ActivityThread.java:5297)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
    at dalvik.system.NativeStart.main(Native Method)

Intent Filter:

<activity
            android:name=".activities.HandleView"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="stateVisible|adjustResize" >
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <action android:name="android.intent.action.SENDTO" />

                <data android:scheme="mailto" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
            </intent-filter>
            <intent-filter android:label="@string/app_name" >
                <action android:name="android.intent.action.SEND" />

                <data android:mimeType="*/*" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter android:label="@string/app_name" >
                <action android:name="android.intent.action.SEND_MULTIPLE" />

                <data android:mimeType="*/*" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
Vinay
  • 2,395
  • 3
  • 30
  • 35
  • "My Question is what should be the value for class loader? " -- there is none. That class is part of another application. This suggests a bug in Android somewhere. Please post your entire stack trace, plus the `` your activity is matching. – CommonsWare Dec 09 '13 at 23:34
  • have you check this so# http://stackoverflow.com/questions/11393751/badparcelableexception-classnotfoundexception-when-unmarshalling – Pradip Dec 10 '13 at 05:12
  • @Yup, yes I have seen it.. Here the user has his Parcelable class. But in my case, I am not sure which class will parcel it.. I just need to know what should be the class loader to be set. Thanks – Vinay Dec 10 '13 at 05:47

0 Answers0