Skip to content

Cannot Initialize DropInClient #1090

@yosrri

Description

@yosrri

Braintree SDK Version

6.13.0

Environment

Sandbox

Android Version & Device

Samsung A52, Android 13

Braintree dependencies

implementation "com.braintreepayments.api:drop-in:6.13.0"

maven {
url "https://cardinalcommerceprod.jfrog.io/artifactory/android"
credentials {
username 'braintree_team_sdk'
password 'AKCp8jQcoDy2hxSWhDAUQKXLDPDx6NYRkqrgFLRc3qDrayg6rrCbJpsKKyMwaykVL8FWusJpp'
}

Describe the bug

Trying to use the drop in ui, i lateinit the dropInClient and implemented the DropInListener, requested a token from our backend, upon arrival of the token from the backend private fun configureDropInClient(token: String) { dropInClient = DropInClient(this, token) dropInClient.setListener(this)
the debugger is stopped at line dropInClient = DropInClient(this, token)
reporting an exception saying: "lifecycleowner signuppaymentfragment{112c298} (63f0e051-95cc-416e-b698-8ee3cefb3148 id=0x7f0a06cb) is attempting to register while current state is resumed. lifecycleowners must call register before they are started."

private fun launchDropIn() {
        val dropInRequest = DropInRequest()
        dropInRequest.isVenmoDisabled = true
        dropInRequest.isGooglePayDisabled = true
        dropInRequest.isCardDisabled = true
        dropInRequest.maskCardNumber = true
        dropInRequest.maskSecurityCode = true
        dropInClient.launchDropIn(dropInRequest)
    } 

i call this after it but it never reached it, except one time which was weird i was debugging

To reproduce

you just initialize the drop in token like i explained

Expected behavior

drop in client get initialized and paypal gatway browser opens

Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions