I’m implementing DeepLinks in compose navigation a...
# compose
v
I’m implementing DeepLinks in compose navigation and I just realised that: This works:
Copy code
private const val DEEP_LINK_URI = "<https://example.com>"
This doesn’t:
Copy code
private const val DEEP_LINK_URI = "<http://www.example.com|www.example.com>"
Is this intentional or I’m missing something? Thanks 🙏
i
Can you explain what exactly you're doing with these constants?
<http://www.example.com|www.example.com>
is a valid
uriPattern
for `navDeepLink`: https://developer.android.com/jetpack/compose/navigation#deeplinks
But it is just shorthand for registering both the
http
and
https
version of that URL as per the docs: https://developer.android.com/guide/navigation/navigation-deep-link#implicit
You'd need to include the http/https if you are trying to
navigate()
to that deep link
v
Gotcha, so I can define it www.example.com, but when I navigate I need to use the protocol. Yeah I was trying to do
navigate("<http://www.example.com|www.example.com>")
There was no protocol since those url were from my API endpoint and the urls were www.example.com/post/{postId} , so I was getting exception