Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

Changes manifest setting from singleInstance => singleTask #1286

Merged
merged 10 commits into from
Aug 8, 2019

Conversation

andrewxhill
Copy link
Member

@andrewxhill andrewxhill commented Aug 7, 2019

fixes #1041
fixes #1141
fixes #1287

Not going to lie, I don't fully understand this one.

Recreating the bug

I used the final clue in the ticket above and installed another gallery app that would take over the intent (Simple Gallery). Then when selecting an image, I'm offered selecting from Photos or Simple Gallery. If I select one and then select an image to share, ImagePicker.launchImageLibrary callback will return with a user cancelled value.

Solution

After looking for other people with similar issues, I found an issue I was reading through (not really related react-native-image-picker/react-native-image-picker#164) and noticed that there are problems if you use android:launchMode="singleInstance" in your manifest. I changed it and voila, it works.

My guess is this is also the cause of the store reviewer they likely just got through onboarding fine because they took a new avatar from their camera (no intent mess up) and then just couldn't post an image because of this bug.

Anyway, fixed.

@andrewxhill andrewxhill force-pushed the andrew/multiple-image-picker-intent-bug branch from 86e1912 to e64d9af Compare August 7, 2019 20:17
asutula
asutula previously approved these changes Aug 7, 2019
Copy link
Member

@asutula asutula left a comment

Choose a reason for hiding this comment

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

Cool, good find. Let's be sure to pay attention to how this affects things like deep linking from group invites.

…out of apps like Slack when links are shared

Signed-off-by: andrew <[email protected]>
@andrewxhill
Copy link
Member Author

yep, did pretty thorough QA this afternoon and found some things.

  • deep linking is working as expected now.
  • photo adds are working as expected now
  • photo re-shares were broken, there was a bug in uiredux now fixed. working as expected
  • fixes navigation to threads after joins now.

only odd thing left i found, is that the react-navigation params set during componentDidMount sometimes lag behind the screen. meaning if a user clicked them immediately it would error. i fixed this by disabling them until they are !undefined. this was actually the case before too, but I believe our app was recycling existing views so often the old values were still available, possibly causing edge-case bugs, not sure.

@andrewxhill andrewxhill merged commit 0b0c266 into master Aug 8, 2019
@andrewxhill andrewxhill deleted the andrew/multiple-image-picker-intent-bug branch August 8, 2019 01:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants