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

Possible lifecycle cleanup in MWA client app when firing association intent #97

Open
creativedrewy opened this issue Jul 11, 2022 · 0 comments
Assignees

Comments

@creativedrewy
Copy link
Contributor

creativedrewy commented Jul 11, 2022

Right now we initiate a client library association with a user's wallet by way of firing off an Intent targeting a receiver Activity included in the wallet app. Unfortunately, this exposes the initiating dApp to potential destruction by the Android OS - The Android documentation explicitly calls this out as documented here.

While this sort of cleanup hasn't become a problem yet, we would do well to try and come up with a method of handling this dApp -> Wallet communication in a way that is more aligned with the Android operating system's operations.

There are a couple of potential options:

  1. Rework the Intent flow, waiting for result codes from the Wallet to initiate any client actions. Interestingly, if we do a complete rework and utilize the AndroidX activity result libraries, we can choose which class receives the result which could help with encapsulation link.
  2. Make the association intents and responses operate through IntentService classes.

There may be other options as well. No matter what, we should investigate and come up with a plane to improve this.

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

2 participants