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

[android][contacts] Fixed back to back presentFormAsync attempt issue #28958

Closed
wants to merge 1 commit into from

Conversation

erenilufer
Copy link

Why

Closes #28951

How

After the first trigger of presentFormAsync, contactManipulationPromise doesn't get back to its initial state which is null. Managed it using startActivityForResult. Only occurs in Android.

Test Plan

It also can be observed and reproducible in apps/bare-expo. Tested in apps/bare-expo in Android 14.

Checklist

@expo-bot
Copy link
Collaborator

Hi there! 👋 I'm a bot whose goal is to ensure your contributions meet our guidelines.

I've found some issues in your pull request that should be addressed (click on them for more details) 👇

⚠️ Suggestion: Missing changelog entries


Your changes should be noted in the changelog. Read Updating Changelogs guide and consider adding an appropriate entry to the following changelogs:


Generated by ExpoBot 🤖 against e921b67

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label May 18, 2024
@jp1987
Copy link

jp1987 commented May 24, 2024

I applied this as a patch, it fixes the issue (partly), but the behaviour is different from iOS. On Android, the presentFormAsync promise resolves immediately on opening of the screen, while on iOS the promise resolves once the screen closes.

@jp1987
Copy link

jp1987 commented May 29, 2024

@erenilufer @EvanBacon I don't mean to be rude and hijack this PR, but this feature is pretty critical for our app, I believe this is the fix: jp1987#1

now presentFormAsync waits for the result like on iOS and no more unhandled rejections.

@erenilufer
Copy link
Author

hello @jp1987 . Sorry for late reply, I didn't have a chance to look into it. Just tested your fix and it looks fine. Solves immediate promise resolve issue. You can go with a new pr or we can add your patch here it's up to you. It's completely okay. Thanks for the fix

@jp1987
Copy link

jp1987 commented May 29, 2024

hello @jp1987 . Sorry for late reply, I didn't have a chance to look into it. Just tested your fix and it looks fine. Solves immediate promise resolve issue. You can go with a new pr or we can add your patch here it's up to you. It's completely okay. Thanks for the fix

Great, thanks for testing! Opened up a PR here: #29201

@erenilufer erenilufer closed this May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: suggestions ExpoBot has some suggestions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[expo-contacts]: Contacts.presentFormAsync breaks on Android
3 participants