Fixed
Status Update
Comments
il...@google.com <il...@google.com>
il...@google.com <il...@google.com>
[Deleted User] <[Deleted User]> #2
This is a huge issue as it is a must have feature for any deeplinking system to support URL parameters as well as matching of URL paths.
The issue is simply because the graph deeplinks are modified a little (replace of placeholders with grouping) and then used as regex patterns, which causes issue because `?` is a regex special character. This can be easily avoided if all the regex special characters are escaped in the deeplink string or even better would be support of true regex in the deeplink urls (which has problems of its own as lint would scream when using `\` in the url)
This can also be avoided if you add your deeplinks programmatically and escape the characters correctly.
The issue is simply because the graph deeplinks are modified a little (replace of placeholders with grouping) and then used as regex patterns, which causes issue because `?` is a regex special character. This can be easily avoided if all the regex special characters are escaped in the deeplink string or even better would be support of true regex in the deeplink urls (which has problems of its own as lint would scream when using `\` in the url)
This can also be avoided if you add your deeplinks programmatically and escape the characters correctly.
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 59b75c42c73e4a6a9979207c702e6841e6665268
Author: Ian Lake <ilake@google.com>
Date: Wed Oct 10 15:54:46 2018
Regex escape NavDeepLinks
Ensure that the only deep link regex like
behavior are {argName} and .* blocks and treat
all other characters as literals.
This fixes issues with URLs with query parameters
(where the ? is a special character) and allows
us to support schemes with '+', -', and '.'
characters as per
https://tools.ietf.org/html/rfc3986#section-3.1
Test: NavDeepLinkTest tests pass
BUG: 110057514
BUG: 112806402
Change-Id: If621eb66ed3ca5e0da780c19b30068dd2824d461
M navigation/common/src/androidTest/java/androidx/navigation/NavDeepLinkTest.kt
M navigation/common/src/main/java/androidx/navigation/NavDeepLink.java
https://android-review.googlesource.com/785556
https://goto.google.com/android-sha1/59b75c42c73e4a6a9979207c702e6841e6665268
Branch: androidx-master-dev
commit 59b75c42c73e4a6a9979207c702e6841e6665268
Author: Ian Lake <ilake@google.com>
Date: Wed Oct 10 15:54:46 2018
Regex escape NavDeepLinks
Ensure that the only deep link regex like
behavior are {argName} and .* blocks and treat
all other characters as literals.
This fixes issues with URLs with query parameters
(where the ? is a special character) and allows
us to support schemes with '+', -', and '.'
characters as per
Test: NavDeepLinkTest tests pass
BUG: 110057514
BUG: 112806402
Change-Id: If621eb66ed3ca5e0da780c19b30068dd2824d461
M navigation/common/src/androidTest/java/androidx/navigation/NavDeepLinkTest.kt
M navigation/common/src/main/java/androidx/navigation/NavDeepLink.java
il...@google.com <il...@google.com> #4
We now properly escape characters in your deep links, so deep linking depending on query parameters will work now.
il...@google.com <il...@google.com> #5
I should say, will work once 1.0.0-alpha07 is released :)
lu...@gmail.com <lu...@gmail.com> #6
This is still happening with 1.0.0-alpha07
il...@google.com <il...@google.com> #7
Re #6 - please file a new bug with a sample project that reproduces your issue.
Description
Version used: 1.0.0-alpha02
Devices/Android versions reproduced on:
Nexus 5 w 7.1 (Lineage OS)
In my project I created navigation graph as follows: Pages List -> Single Page -> Page Comments.
Each of destinations have their own Deep Link with some parameters in path:
1) Pages List: <deepLink app:uri="
2) Single Page: <deepLink app:uri="
3) Page Comments: <deepLink app:uri="
And with those path arguments all is OK.
Then if we try to replace path arguments with get query parameters - strange things will begin to happen.
For example if we change Single Page deep link to this `<deepLink app:uri="
Same for Page Comments, if we would add atleast one get query param - it'll always open root page (Pages List) when opened from matched Deep Link.
Here is link for demo project: