I am using Android App Links to take users to a specific screens directly in my app. I am following same approach as Rakuten, meaning the last path segment(lps) of the url is a valid domain, which lands user to a specific brand screen on my app.
https://www.rakuten.com/nike.com (lps = nike.com)
https://www.rakuten.com/adidas.com (lps = addidas.com)
https://www.rakuten.com/samsung.com (lps = samsung.com)
Android Manifest Code
<data android:host="www.rakuten.com" android:scheme="https" android:pathPattern=".*..*"/>
The pathPattern = ".*..*"
allows any domain in the url to open inside my app. All of the below links open Nike brand screen in my app.
https://www.rakuten.com/dir1/nike.com
https://www.rakuten.com/dir1/dir2/nike.com
https://www.rakuten.com/dir1/dir2/dir3/nike.com
https://www.rakuten.com/dir1/dir2/dir3/dir4/nike.com
CASE TO HANDLE:
if any url contains /browser/
(meaning subdirectory name = browser
), I want to open that url in the browser and not inside my app.
https://www.rakuten.com/browser/nike.com (should open in browser and not in app)
Is there any possibility to do that?
from Android App Links - exclude specific sub-directory
No comments:
Post a Comment