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

[Identity] preserve states when activity is destroyed #5252

Merged
merged 5 commits into from Jul 6, 2022

Conversation

ccen-stripe
Copy link
Collaborator

Summary

This changes makes sure the SDK works correctly when "don't keep activities" is turned on in developer settings.

  • PhotoTaker and ImageChooser was refactored to ensure the photo taken/image chosen would be correctly pass back to its calling activity once it's restored
  • ConsentFragment no longer automatically advances to DocSelectionFragment when consent is granted, this makes sure when activity is restored and the consent boolean is true because a new network request is made, the user can go still back to the ConsentFragment
  • Make IdentityViewModel and IdentityUploadViewModel's Factory extending AbstractSavedStateViewModelFactory, so that the upload state could be preserved upon process kill
    • DocumentUploadState, SelfieUploadState, AnalyticsState, Resourceare annotated with@Parcelize` in order to be saved.

Motivation

Support process kill for Identity SDK

Testing

  • Added tests
  • Modified tests
  • Manually verified

Screenshots

Before After
before screenshot after screenshot

Changelog

Base automatically changed from ccen/recoverWhenDestroyed to master July 6, 2022 19:55
@ccen-stripe ccen-stripe merged commit f43009b into master Jul 6, 2022
@ccen-stripe ccen-stripe deleted the ccen/recoverWhenDestroyed2 branch July 6, 2022 20:26
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

Successfully merging this pull request may close these issues.

None yet

2 participants