question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BraintreeFragment to child FragmentManager

See original GitHub issue

General information

  • SDK/Library version: 2.22.0
  • Environment: all
  • Android Version and Device: n/a
  • Braintree dependencies:
  • com.braintreepayments.api:braintree:2.22.0

Issue description

Our application in general works with representing scenes with Fragments which are hosted by a single activity. As the customer navigates in the app, the scene Fragments are replaced in the Activity.

One of such Fragment is our ‘checkout experience’. On this Fragment, we take care of using BraintreeFragment. The SDK only allows attaching the BraintreeFragment to the FragmentManager of the host Activity. As a result, when the customer leaves the checkout scene, the BraintreeFragment is still there.

We’d like to be able to attach BraintreeFragment to Fragment.getChildFragmentManager so that we don’t have to be concerned about what remains there on the Activity when the customer leaves the checkout scene.

  • Question 1) Would you be able to provide a BraintreeFragment.newInstance overload that accepts a Fragment instead of Activity and attaches to the child FragmentManager?
  • Question 2) Would you be able to provide means of removing the attached BraintreeFragment? Or shall we simply use BraintreeFragment.TAG, still somewhat relying on what newInstance does internally?

I found #245 somewhat connected because of https://github.com/braintree/braintree_android/issues/245#issuecomment-467096133

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
moia-zsoltcommented, May 16, 2019

unless you’re willing to open a PR!

I definitely want to. (I expect early next week.)

0reactions
zsoltvilagoscommented, Jun 7, 2019

Was my pleasure. Thx for the release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

BraintreeFragment (Braintree 3.7.1 API) - javadoc.io
Create a new instance of BraintreeFragment using the tokenization key or client token and add it to the Fragment 's child FragmentManager ....
Read more >
Fragment manager - Android Developers
An activity hosts a single parent NavHostFragment and fills its space with different child destination fragments as users navigate through your ...
Read more >
Proper use of sub sub fragments with (Child)FragmentManager
My (simplified) use case is following, I have an activity with a layout fragment and this fragment theirself contains a sub fragment... all ......
Read more >
androidx.appcompat.app.AppCompatActivity Java Examples
static void onActivityResult(final BraintreeFragment fragment, int resultCode, Intent data) { if (resultCode == AppCompatActivity.RESULT_OK) { fragment.
Read more >
Viewing online file analysis results for 'Mercari.apk'
BraintreeFragment. Ansi based on Hybrid Analysis (b.smali). com.braintreepayments.api. ... Failed to remove expected request manager fragment, manager:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found