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

[image-picker][android] Fix non-serializable type #23768

Merged
merged 3 commits into from
Aug 18, 2023

Conversation

alanjhughes
Copy link
Collaborator

Why

Partially addresses #23447. The Uri type is not serializable and will cause a crash when recreating the activity if it has been destroyed.

How

Switch from using Uri to String and convert back and forth where necessary

Test Plan

When setting the developer option Don't keep activities every activity is destroyed after they are left. While using a Uri this would crash with a NotSerializableException, using a String resolves this but it still crashes. When the activity is recreated, the expo module is not recreated or at least not soon enough to prevent a crash.

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Jul 29, 2023
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Jul 29, 2023
@alanjhughes alanjhughes marked this pull request as ready for review July 29, 2023 21:51
@jrnp97
Copy link

jrnp97 commented Aug 17, 2023

up 🙌🏼

@alanjhughes alanjhughes merged commit ed5a146 into main Aug 18, 2023
8 checks passed
@alanjhughes alanjhughes deleted the @alanhughes/image-picker/non-serializable-error branch August 18, 2023 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: passed checks ExpoBot has nothing to complain about
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants