flutter-braintree icon indicating copy to clipboard operation
flutter-braintree copied to clipboard

In order fro PayPal to work it may be necessary to update your android manifest

Open nicolobozzato opened this issue 1 year ago • 3 comments

Something changed in the way the class manage the activity result you should try to update the manifest in this way See this issue on the original sdk https://github.com/braintree/braintree-android-drop-in/issues/419 That link to this page https://developer.paypal.com/braintree/docs/guides/drop-in/setup-and-integration/android/v4/#paypal

This are the modification necessary for the DropInActivity in the manifest

<activity android:name="com.braintreepayments.api.DropInActivity" android:exported="true" tools:node="merge" > <intent-filter tools:node="removeAll" /> <intent-filter> <action android:name="android.intent.action.VIEW" /> <data android:scheme="@string/braintree" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> </intent-filter> </activity>

I'll try to provide a PR to update the example and documentation as soon as I can, if you can do before even better

nicolobozzato avatar Jul 15 '24 10:07 nicolobozzato

Hello,

I have used BraintreeBrowserSwitchActivity version 3.0.0.Now I have changed version 4.0.0 ,so BraintreeBrowserSwitchActivity doesn't work at all.App is crashing Now I have changed manifest file and used com.braintreepayments.api.DropInActivity but Vault flow is not working with this.I can't pass amount 'null' or '0'.It simply doesn't accept it and app crash

mansiRadicalRack avatar Aug 01 '24 13:08 mansiRadicalRack

Any problem to this issue? having similar issue

krishnalalstha avatar Sep 16 '24 17:09 krishnalalstha

com.braintreepayments.api.DropInActivity

With this I see another issue, if you're on Android 14 (only 14 doesn't happen on 15 and only on some devices) if a user cancels the PayPal payment it throws exception and doesn't come back to the app.

Exception java.lang.RuntimeException: at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:4164) at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:4322) at android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:103) at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:139) at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:96) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2685) at android.os.Handler.dispatchMessage (Handler.java:106) at android.os.Looper.loopOnce (Looper.java:230) at android.os.Looper.loop (Looper.java:319) at android.app.ActivityThread.main (ActivityThread.java:8919) at java.lang.reflect.Method.invoke at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:578) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1103) Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'void android.os.Bundle.setClassLoader(java.lang.ClassLoader)' on a null object reference at com.braintreepayments.api.DropInActivity.getDropInRequest (DropInActivity.java) at com.braintreepayments.api.DropInActivity.onCreate (DropInActivity.java) at android.app.Activity.performCreate (Activity.java:8975) at android.app.Activity.performCreate (Activity.java:8944) at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1456) at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:4146)

BunnyBuddy avatar Sep 23 '24 07:09 BunnyBuddy