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

Unable to implement SDK on activity that does not extend from FragmentActivity #413

Closed
IndianaSloan opened this issue Apr 17, 2023 · 1 comment

Comments

@IndianaSloan
Copy link

Integration Details (please complete the following information):

  • SDK/Library version: 6.9.0
  • Environment: Sandbox
  • Android Version and Device: N/A
  • Braintree dependencies:
    com.braintreepayments.api:drop-in:6.9.0

Describe the bug
I am attempting to implement the Braintree SDK in my native android application and following the docs as provided here.

In order to create a new instance of the DropInClient, I notice that in each of the constructors that are not deprecated, the only options are to either provide a Fragment or a FragmentActivity. However in my application I am using Jetpack Compose and following a single activity architecture. My single Activity does not extend from FragmentActivity and I am not using Fragments in my application.

I see there is a @Deprecated constructor that takes a Context however it does not allow you to provide a ClientTokenProvider which I will need to do.

Is there some solution or workaround that can be implemented to support launching the Drop In SDK from within a project that is using Jetpack Compose?

I have seen on an earlier version of the SDK (5.2.1) you could retrieve an Intent from the DropInRequest instance, but I don't see that in the current version.

To Reproduce
Implement the SDK on a project that does not implement FragmentActivity or Fragments

@IndianaSloan
Copy link
Author

Closing as I'm able to extend from FragmentActivity and still access the compose setContent{} API

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

1 participant