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

[expo-sms][android] fix flicker on sendSMSAsync if there are no attachments #8639

Merged
merged 1 commit into from Jun 4, 2020

Conversation

esamelson
Copy link
Contributor

Why

Found during QA that after #7967, if the messages app is not already open in the background, calling sendSMSAsync causes a weird flicker where the home screen flashes for a second, then goes back to the app, then finally to the messages app. This happens on both an Android 10 device and emulator.

Determined that the change in Intent type was the cause, tried experimenting with different intent types (ACTION_SENDTO, ACTION_SEND, ACTION_SEND_MULTIPLE) and using Intent.createChooser but could not find a combination that successfully opened Messages without a flicker AND worked with attachments.

How

Work around this issue by using the previous logic (ACTION_SENDTO intent) for messages without attachments, and the new logic (with the flicker) only for messages with attachments. This prevents regressions for people who aren't using the new feature and reduces the chances end users will encounter this flicker.

Test Plan

SMS tests in test-suite all pass, and the test without an attachment no longer causes a flicker when Messages is not already open in the background.

@esamelson esamelson requested a review from bbarthec June 3, 2020 19:32
@github-actions
Copy link
Contributor

github-actions bot commented Jun 3, 2020

Native Component List for this branch is ready

Copy link
Contributor

@bbarthec bbarthec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@esamelson esamelson merged commit 7067ebc into master Jun 4, 2020
@esamelson esamelson deleted the @eric/sms-flicker branch June 4, 2020 23:54
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