Read complete story

How to reduce the app size while using the io.card module in paypal sdk

If you are using the PayPal SDK and want to make the standard payment, simply you have to write this compiled code in your build.gradle,

After that, if you noticed the size of the app(.apk) increases twice or thrice(approx 10 -12mb increased).

 

What is the reason behind it? 

> io.card module is the reason.

If you have simply excluded this io.card module from the PayPal SDK:

the app size will be reduced.

But there is one problem to exclude this module, You will not make the payment by your debit/credit card.
There is two option to make payment by card,

And the main reason behind increasing the app size is the First option, automatically card scanner.

So what will have to do?

We have to exclude only the automatically card scanner option from the app.
So we have to add packagingOptions where we have to exclude the card scanner related files which have included the .so file instead of the whole io.card module.

In the build.gradle,

paste above file parallels to defaultConfig. After this app size will be reduce and you can also use the  direct card payment option.

. . .

Comment

Add Your Comment

Be the first to comment.

css.php
Hire Us!
Brief us about your requirements and we'll get back to you.
Woo! Hooy!
We have just recieved your project brief and our expert will contact you shortly.
Send Again
Close