Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nicolobozzato opened this issue Jul 15, 2024 · 3 comments

Comments

@nicolobozzato
Copy link
Contributor

nicolobozzato commented Jul 15, 2024

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
braintree/braintree-android-drop-in#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

@mansiRadicalRack
Copy link

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

@krishnalalstha
Copy link

Any problem to this issue? having similar issue

@BunnyBuddy
Copy link

BunnyBuddy commented Sep 23, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants