I have got Service in android app2. I want to start Service from app1 and pass Album object in Intent to Service in app2.
In app1
var alb: Album = Album()
alb.name="album name"
alb.numOfSongs=1
alb.thumbnail=2
var serviceIntent: Intent = Intent();
var componentName: ComponentName = ComponentName("com.eusecom.demoad","com.eusecom.demoad.view.EkasaService")
serviceIntent.setComponent(componentName)
serviceIntent.putExtra("albumpar", alb)
context.startService(serviceIntent)
In app2 in Service class
#Override
public int onStartCommand(Intent intent, int flags, int startId) {
Album alb = intent.getParcelableExtra("albumpar");
}
I can to pass String in Intent. If i put to Intent the Parcelable i get error.
02-27 14:12:18.438 22198-22198/com.eusecom.demoad E/Parcel: Class not found when unmarshalling: com.eusecom.samshopersung.models.Album
java.lang.ClassNotFoundException: com.eusecom.samshopersung.models.Album
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:400)
at android.os.Parcel.readParcelableCreator(Parcel.java:2517)
at android.os.Parcel.readParcelable(Parcel.java:2471)
at android.os.Parcel.readValue(Parcel.java:2374)
at android.os.Parcel.readArrayMapInternal(Parcel.java:2727)
at android.os.BaseBundle.unparcel(BaseBundle.java:269)
at android.os.BaseBundle.getString(BaseBundle.java:992)
at android.content.Intent.getStringExtra(Intent.java:6743)
at com.eusecom.demoad.view.EkasaService.onStartCommand(EkasaService.java:29)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3685)
at android.app.ActivityThread.-wrap23(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1740)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6692)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.eusecom.samshopersung.models.Album" on path: DexPathList[[zip file "/data/app/com.eusecom.demoad-1/base.apk"],nativeLibraryDirectories=[/data/app/com.eusecom.demoad-1/lib/arm64, /system/lib64, /vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:400)
at android.os.Parcel.readParcelableCreator(Parcel.java:2517)
at android.os.Parcel.readParcelable(Parcel.java:2471)
at android.os.Parcel.readValue(Parcel.java:2374)
at android.os.Parcel.readArrayMapInternal(Parcel.java:2727)
at android.os.BaseBundle.unparcel(BaseBundle.java:269)
at android.os.BaseBundle.getString(BaseBundle.java:992)
at android.content.Intent.getStringExtra(Intent.java:6743)
at com.eusecom.demoad.view.EkasaService.onStartCommand(EkasaService.java:29)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3685)
at android.app.ActivityThread.-wrap23(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1740)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6692)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)
02-27 14:12:18.439 22198-22198/com.eusecom.demoad D/AndroidRuntime: Shutting down VM
02-27 14:12:18.440 22198-22198/com.eusecom.demoad E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.eusecom.demoad, PID: 22198
java.lang.RuntimeException: Unable to start service com.eusecom.demoad.view.EkasaService#fe9af21 with Intent { cmp=com.eusecom.demoad/.view.EkasaService launchParam=MultiScreenLaunchParams { mDisplayId=0 mFlags=0 } (has extras) }: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.eusecom.samshopersung.models.Album
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3702)
at android.app.ActivityThread.-wrap23(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1740)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6692)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)
Caused by: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.eusecom.samshopersung.models.Album
at android.os.Parcel.readParcelableCreator(Parcel.java:2545)
at android.os.Parcel.readParcelable(Parcel.java:2471)
at android.os.Parcel.readValue(Parcel.java:2374)
at android.os.Parcel.readArrayMapInternal(Parcel.java:2727)
at android.os.BaseBundle.unparcel(BaseBundle.java:269)
at android.os.BaseBundle.getString(BaseBundle.java:992)
at android.content.Intent.getStringExtra(Intent.java:6743)
at com.eusecom.demoad.view.EkasaService.onStartCommand(EkasaService.java:29)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3685)
at android.app.ActivityThread.-wrap23(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1740)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6692)
at java.lang.reflect.Method.invoke(Native Method)
You are better off serializing the object to a String, passing the String in the Intent and then deserialize the String to an object in the target application.
Related
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.m3h.pmne, PID: 19352
java.lang.RuntimeException: Parcelable encountered IOException writing serializable object (name = com.m3h.pmne.ServerResponse.FormParentResponse)
at android.os.Parcel.writeSerializable(Parcel.java:1730)
at android.os.Parcel.writeValue(Parcel.java:1678)
at android.os.Parcel.writeArrayMapInternal(Parcel.java:891)
at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1579)
at android.os.Bundle.writeToParcel(Bundle.java:1233)
at android.os.Parcel.writeBundle(Parcel.java:931)
at androidx.fragment.app.FragmentState.writeToParcel(FragmentState.java:125)
at android.os.Parcel.writeTypedObject(Parcel.java:1532)
at android.os.Parcel.writeTypedList(Parcel.java:1411)
at android.os.Parcel.writeTypedList(Parcel.java:1396)
at androidx.fragment.app.FragmentManagerState.writeToParcel(FragmentManagerState.java:58)
at android.os.Parcel.writeParcelable(Parcel.java:1699)
at android.os.Parcel.writeValue(Parcel.java:1605)
at android.os.Parcel.writeArrayMapInternal(Parcel.java:891)
at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1579)
at android.os.Bundle.writeToParcel(Bundle.java:1233)
at android.os.Parcel.writeBundle(Parcel.java:931)
at android.os.Parcel.writeValue(Parcel.java:1596)
at android.os.Parcel.writeArrayMapInternal(Parcel.java:891)
at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1579)
at android.os.Bundle.writeToParcel(Bundle.java:1233)
at android.os.Parcel.writeBundle(Parcel.java:931)
at android.os.Parcel.writeValue(Parcel.java:1596)
at android.os.Parcel.writeArrayMapInternal(Parcel.java:891)
at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1579)
at android.os.Bundle.writeToParcel(Bundle.java:1233)
at android.app.IActivityManager$Stub$Proxy.activityStopped(IActivityManager.java:3858)
at android.app.servertransaction.PendingTransactionActions$StopInfo.run(PendingTransactionActions.java:144)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7156)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)
Caused by: java.io.NotSerializableException: com.m3h.pmne.ServerResponse.Data
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1240)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1604)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1565)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1488)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1234)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:354)
at android.os.Parcel.writeSerializable(Parcel.java:1725)
at android.os.Parcel.writeValue(Parcel.java:1678)
at android.os.Parcel.writeArrayMapInternal(Parcel.java:891)
at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1579)
at android.os.Bundle.writeToParcel(Bundle.java:1233)
at android.os.Parcel.writeBundle(Parcel.java:931)
at androidx.fragment.app.FragmentState.writeToParcel(FragmentState.java:125)
at android.os.Parcel.writeTypedObject(Parcel.java:1532)
at android.os.Parcel.writeTypedList(Parcel.java:1411)
at android.os.Parcel.writeTypedList(Parcel.java:1396)
at androidx.fragment.app.FragmentManagerState.writeToParcel(FragmentManagerState.java:58)
at android.os.Parcel.writeParcelable(Parcel.java:1699)
at android.os.Parcel.writeValue(Parcel.java:1605)
at android.os.Parcel.writeArrayMapInternal(Parcel.java:891)
at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1579)
at android.os.Bundle.writeToParcel(Bundle.java:1233)
at android.os.Parcel.writeBundle(Parcel.java:931)
at android.os.Parcel.writeValue(Parcel.java:1596)
at android.os.Parcel.writeArrayMapInternal(Parcel.java:891)
at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1579)
at android.os.Bundle.writeToParcel(Bundle.java:1233)
at android.os.Parcel.writeBundle(Parcel.java:931)
at android.os.Parcel.writeValue(Parcel.java:1596)
at android.os.Parcel.writeArrayMapInternal(Parcel.java:891)
at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1579)
at android.os.Bundle.writeToParcel(Bundle.java:1233)
at android.app.IActivityManager$Stub$Proxy.activityStopped(IActivityManager.java:3858)
at android.app.servertransaction.PendingTransactionActions$StopInfo.run(PendingTransactionActions.java:144)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7156)
at java.lang.reflect.Method.invoke(Native Method)
GoodDay everybody.
I wrote a class which extends AsyncTask.
public class InitTransaction extends AsyncTask<TransactionParameters, Void, String> {
#Override
protected String doInBackground(TransactionParameters... params) {
// I do some stuff here
return result;
}
#Override
protected void onPostExecute(String result) {
super.onPostExecute(result);
// I do some more stuff
}
}
The class is called with:
TransactionParameters transParams = new TransactionParameters(param1, param2);
InitTransaction initTransaction = new InitTransaction();
initTransaction.execute(transParams);
The problem is that i get an error while passing the object to the task:
[![No method?][1]][1]
Anybody knows where the problem may be?
EDIT
Fixed that problem now I have another one.
As soon as I execute initTransaction.execute(transParams); boom!
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.infovision.elcam_02, PID: 17443
java.lang.IllegalStateException: Could not execute method for android:onClick
at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:389)
at android.view.View.performClick(View.java:6600)
at android.view.View.performClickInternal(View.java:6577)
at android.view.View.access$3100(View.java:781)
at android.view.View$PerformClick.run(View.java:25912)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6923)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:870)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:384)
at android.view.View.performClick(View.java:6600)
at android.view.View.performClickInternal(View.java:6577)
at android.view.View.access$3100(View.java:781)
at android.view.View$PerformClick.run(View.java:25912)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6923)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:870)
Caused by: android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?
at android.view.ViewRootImpl.setView(ViewRootImpl.java:828)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:356)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:93)
at android.app.Dialog.show(Dialog.java:329)
at com.infovision.elcam_02.MainActivity$InitTransaction.onPreExecute(MainActivity.java:242)
at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:648)
at android.os.AsyncTask.execute(AsyncTask.java:595)
at com.infovision.elcam_02.MainActivity.scanCode(MainActivity.java:133)
at java.lang.reflect.Method.invoke(Native Method)
at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:384)
at android.view.View.performClick(View.java:6600)
at android.view.View.performClickInternal(View.java:6577)
at android.view.View.access$3100(View.java:781)
at android.view.View$PerformClick.run(View.java:25912)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6923)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:870)
first time getting below exception on activity startup & could not find out what is the cause.any help will be appreciated.
08-24 11:05:01.218 16287-16287/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.myproject, PID: 16287
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myproject/com.myproject.common.calendar.CalendarMainActivity}: kotlin.a
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2659)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2720)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1466)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6111)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Caused by: kotlin.a
at com.myproject.common.calendar.CalendarMainActivity.R(SourceFile:79)
at com.myproject.common.calendar.CalendarMainActivity.m(SourceFile:73)
at com.myproject.common.activity.a.setContentView(SourceFile:90)
at com.myproject.common.calendar.CalendarMainActivity.onCreate(SourceFile:47)
at android.app.Activity.performCreate(Activity.java:6734)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2612)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2720)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1466)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6111)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
I get the following error, I know this means that Some class has to be implements Serializable but the problem is all the classes I've created does implement Serializable.
Process: com.example.awarrior.gallery, PID: 2554
java.lang.RuntimeException: Parcelable encountered IOException writing serializable object (name = com.example.awarrior.gallery.Item)
at android.os.Parcel.writeSerializable(Parcel.java:1526)
at android.os.Parcel.writeValue(Parcel.java:1474)
at android.os.Parcel.writeArrayMapInternal(Parcel.java:723)
at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1408)
at android.os.Bundle.writeToParcel(Bundle.java:1133)
at android.os.Parcel.writeBundle(Parcel.java:763)
at android.content.Intent.writeToParcel(Intent.java:8655)
at android.app.ActivityManagerProxy.startActivity(ActivityManagerNative.java:3052)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1518)
at android.app.ContextImpl.startActivity(ContextImpl.java:819)
at android.app.ContextImpl.startActivity(ContextImpl.java:796)
at android.content.ContextWrapper.startActivity(ContextWrapper.java:356)
at com.example.awarrior.gallery.ItemAdapter$1.onClick(ItemAdapter.java:57)
at android.view.View.performClick(View.java:5610)
at android.view.View$PerformClick.run(View.java:22265)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Caused by: java.io.NotSerializableException: android.graphics.drawable.BitmapDrawable
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1224)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1584)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1549)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1472)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1218)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
at android.os.Parcel.writeSerializable(Parcel.java:1521)
at android.os.Parcel.writeValue(Parcel.java:1474)
at android.os.Parcel.writeArrayMapInternal(Parcel.java:723)
at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1408)
at android.os.Bundle.writeToParcel(Bundle.java:1133)
at android.os.Parcel.writeBundle(Parcel.java:763)
at android.content.Intent.writeToParcel(Intent.java:8655)
at android.app.ActivityManagerProxy.startActivity(ActivityManagerNative.java:3052)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1518)
at android.app.ContextImpl.startActivity(ContextImpl.java:819)
at android.app.ContextImpl.startActivity(ContextImpl.java:796)
at android.content.ContextWrapper.startActivity(ContextWrapper.java:356)
at com.example.awarrior.gallery.ItemAdapter$1.onClick(ItemAdapter.java:57)
at android.view.View.performClick(View.java:5610)
at android.view.View$PerformClick.run(View.java:22265)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
here's the code that causes the error.
holder.ivImg.setOnClickListener(new View.OnClickListener(){
#Override
public void onClick(View v) {
Intent intent = new Intent(context, Detail.class);
intent.putExtra("item", item);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
}
});
The problem was that you can't serialize Bitmaps so instead you may serialize its URL, but I'm not sure what to do if the image was in drawble folder.
How could I solve the problem below? I searched a lot but I didn't figure out.
I am using a fragment instead of an activity to call PaymentActivity.
Thanks in advance.
There is a piece of code below.
public void executarPagtoPayPal()
{
SearchResultsAdapter searchResultsAdapter = new SearchResultsAdapter(getActivity(), new ArrayList<Produto>());
PayPalPayment coisasAComprar = searchResultsAdapter.prepararCarrinhoFinal();
Intent i = new Intent(getActivity(), PaymentActivity.class);
i.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, payPalConfiguration);
i.putExtra(PaymentActivity.EXTRA_PAYMENT, coisasAComprar);
startActivityForResult(i,CODIGO_PAGTO);
}
06-01 13:26:31.841 12770-12770/com.viralandroid.test E/Parcel: Class not found when unmarshalling:
java.lang.ClassNotFoundException: Invalid name:
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:309)
at android.os.Parcel.readParcelableCreator(Parcel.java:2281)
at android.os.Parcel.readParcelable(Parcel.java:2245)
at com.paypal.android.sdk.payments.PayPalPayment.(Unknown Source)
at com.paypal.android.sdk.payments.PayPalPayment.(Unknown Source)
at com.paypal.android.sdk.payments.br.createFromParcel(Unknown Source)
at android.os.Parcel.readParcelable(Parcel.java:2252)
at android.os.Parcel.readValue(Parcel.java:2152)
at android.os.Parcel.readArrayMapInternal(Parcel.java:2485)
at android.os.BaseBundle.unparcel(BaseBundle.java:221)
at android.os.BaseBundle.containsKey(BaseBundle.java:269)
at android.content.Intent.hasExtra(Intent.java:5055)
at com.paypal.android.sdk.payments.d.b(Unknown Source)
at com.paypal.android.sdk.payments.PaymentActivity.onCreate(Unknown Source)
at android.app.Activity.performCreate(Activity.java:6178)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2648)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769)
at android.app.ActivityThread.access$900(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1430)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5910)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)
06-01 13:26:31.841 12770-12770/com.viralandroid.test D/AndroidRuntime: Shutting down VM
06-01 13:26:31.841 12770-12770/com.viralandroid.test E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.viralandroid.test, PID: 12770
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.viralandroid.test/com.paypal.android.sdk.payments.PaymentActivity}: android.os.BadParcelableException: ClassNotFoundException when unmarshalling:
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2695)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769)
at android.app.ActivityThread.access$900(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1430)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5910)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)
Caused by: android.os.BadParcelableException: ClassNotFoundException when unmarshalling:
at android.os.Parcel.readParcelableCreator(Parcel.java:2295)
at android.os.Parcel.readParcelable(Parcel.java:2245)
at com.paypal.android.sdk.payments.PayPalPayment.(Unknown Source)
at com.paypal.android.sdk.payments.PayPalPayment.(Unknown Source)
at com.paypal.android.sdk.payments.br.createFromParcel(Unknown Source)
at android.os.Parcel.readParcelable(Parcel.java:2252)
at android.os.Parcel.readValue(Parcel.java:2152)
at android.os.Parcel.readArrayMapInternal(Parcel.java:2485)
at android.os.BaseBundle.unparcel(BaseBundle.java:221)
at android.os.BaseBundle.containsKey(BaseBundle.java:269)
at android.content.Intent.hasExtra(Intent.java:5055)
at com.paypal.android.sdk.payments.d.b(Unknown Source)
at com.paypal.android.sdk.payments.PaymentActivity.onCreate(Unknown Source)
at android.app.Activity.performCreate(Activity.java:6178)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2648)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769)
at android.app.ActivityThread.access$900(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1430)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5910)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)
It looks like the contents of the PayPalPayment that you are putting in the Intent are not correct. Please validate that this object has all the correct data.