-
Notifications
You must be signed in to change notification settings - Fork 677
Add OnrampActivity to test OnrampCoordinator functionality #11157
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
Conversation
- Created OnrampActivity with ViewModel-based state management - Supports email lookup, registration, and authentication flows - Added dedicated 'Onramp' section to MainActivity at bottom - Implemented memory-safe architecture without leaks - Added @RestrictTo annotations for library group access - Loading state waits for configuration completion
- Split large RegistrationScreen function into smaller components - Added @Suppress for TooGenericExceptionCaught in callback error handling - Fixed trailing spaces and unnecessary blank lines
Risky Change This is considered a risky change because it adjusts the sample app build.gradle, please review carefully. By adding the label |
Diffuse output:
APK
|
32eff92
to
202ac99
Compare
@@ -25,7 +26,8 @@ import javax.inject.Inject | |||
* @param onrampCallbacks Callback structure that manages the results of asynchronous requests | |||
* made by the coordinator. | |||
*/ | |||
internal class OnrampCoordinator @Inject internal constructor( | |||
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so that we can test it on the example app
- OnrampCoordinator, OnrampConfiguration, OnrampCallbacks now library-group restricted - Updated API declarations to reflect new internal access scope
@@ -25,7 +25,7 @@ internal class LinkControllerCoordinator @Inject constructor( | |||
val linkActivityResultLauncher: ActivityResultLauncher<LinkActivityContract.Args> | |||
|
|||
init { | |||
check(lifecycleOwner.lifecycle.currentState.isAtLeast(Lifecycle.State.CREATED)) | |||
check(lifecycleOwner.lifecycle.currentState.isAtLeast(Lifecycle.State.INITIALIZED)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Relaxed this so that we can build the LinkController (and register the activity launchers) before the activity is fully created. (The on ramp activity was crashing when initializing in onCreate
).
CC @lng-stripe
202ac99
to
3246234
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good start 👍
Summary
Added
OnrampActivity
topaymentsheet-example
to test OnrampCoordinator functionality as we progress on the implementation.onramp.webm
Testing
Screenshots