paytabscom / paytabs-android-library-sample

Sample for Paytabs android library
MIT License
11 stars 7 forks source link

Too Large Exception for data parcel #28

Closed mohsinbutt2020 closed 3 years ago

mohsinbutt2020 commented 3 years ago

### When i use merchen logo then i get this issue for android version 8 and less version or on low memory devices

com.payment.paymentsdk.PaymentSdkActivity, giving up android.os.TransactionTooLargeException: data parcel size 751684 bytes at android.os.BinderProxy.transactNative(Native Method) at android.os.BinderProxy.transact(Binder.java:763) at android.app.IApplicationThread$Stub$Proxy.scheduleLaunchActivity(IApplicationThread.java:1282) at com.android.server.am.ActivityStackSupervisor.realStartActivityLocked(ActivityStackSupervisor.java:1734) at com.android.server.am.ActivityStackSupervisor.attachApplicationLocked(ActivityStackSupervisor.java:1152) at com.android.server.am.ActivityManagerService.attachApplicationLocked(ActivityManagerService.java:9184) at com.android.server.am.ActivityManagerService.attachApplication(ActivityManagerService.java:9254) at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:291) at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3863) at android.os.Binder.execTransact(Binder.java:682)

mohamedkhairy953 commented 3 years ago

This exception indicates that you logo is too large to be passed through bundle, so that we have overloaded this method to accept url instead of the drawable.

You can pass the logo url or its relative path and it will work correctly.

mohsinbutt2020 commented 3 years ago

I checked all the possibilities with drawable image, in-fact i passed 4kb of image from drawable but that did not work.. It only work with almost all new devices from android 9 onward.

mohamedkhairy953 commented 3 years ago

Yes, as it depends on different factors not just the logo size, so we recommend passing url as it is more stable.

On Mon, Sep 20, 2021, 12:07 PM Mohsin Butt @.***> wrote:

I checked all the possibilities with drawable image, in-fact i passed 4kb of image from drawable but the did not work.. It only work with almost new devices.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/paytabscom/paytabs-android-library-sample/issues/28#issuecomment-922788135, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIGPXUZ6GZW25EP2TSUSBDUC4BVBANCNFSM5ELMWYDA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

mohsinbutt2020 commented 3 years ago

Ok Thanks...