react-navigation / react-navigation.github.io

Home of the documentation and other miscellanea
https://reactnavigation.org/
MIT License
312 stars 1.89k forks source link

Deeplinking guide has incorrect android intent-filter #1119

Open OrkhanAlikhanov opened 2 years ago

OrkhanAlikhanov commented 2 years ago

https://github.com/react-navigation/react-navigation.github.io/blob/bfc09a18884e06304f9e79176ef5e9f3d2c0cb8c/versioned_docs/version-6.x/deep-linking.md?plain=1#L164-L179

The data fields gets merged:

<data android:scheme="mychat" /> 
<data android:scheme="https" android:host="www.example.com" /> 
<data android:scheme="http" android:host="www.example.com" /> 

becomes:

<data android:scheme="mychat"
           android:scheme="https"
           android:scheme="http"
           android:host="www.example.com" /> 

And with that, only mychat://www.example.com will open the app.

Source https://stackoverflow.com/a/27321468/5555803

The solution is to use different intent-filters.

OrkhanAlikhanov commented 2 years ago

This caused me issues so I reported. I can send a PR if this is approved.