2

Question: There is a requirement to open an app's particular screen, based on a deep link in the react-native app.

I had implemented demo:://app/... as a custom scheme in Andoridmanifest.xml for Android and info.plist for iOS.

When I test it with demo:://app/screen/2, it deep-link to the app and opens the second screen of the app. And this behavior is expected when the app receives demo:://app/screen/2 from other apps.

The problem starts appearing when I try to test the app with tinyurl.com/y4qygctx instead of demo:://app/screen/2.

Note - tinyurl.com/y4qygctx is shortened form of demo:://app/screen/2.

Please enlighten solutions based on your experience. Thank you in advance !!!

Ankit Kumar
  • 3,663
  • 2
  • 26
  • 38
  • you have to declare deep-link scheme in manifest, thats all. use `demo://` scheme always or declare specific `tinyurl` URL (which isn't reliable, thats not yours domain) – snachmsm Nov 18 '20 at 06:41
  • Here tiny URL is just an example. shortened URL can be anything but it is short url for `demo://app/...`. what if someone use bit.ly url instead of `demo://app/...`?? – Ankit Kumar Nov 18 '20 at 08:40
  • `bit.ly` is just an url, it will be opened in app which supports that kind of links, so probably only web browser. and when browser send request for content it will get redirected link and will try to resolve it - how it will be done it depends on browser, some may try to look for a supporting app, some other may just show "can't resolve" hint. note that since Android 11 apps have very restricted access to check which apps are installed on device and what they are supporting/which privileges they have declared/granted – snachmsm Nov 18 '20 at 08:50
  • @AnkitKumar Did you find a solution to this? Using bitly it works fine for the app in iOS but not for Android it just opens in the browser. – MadMac Jul 08 '22 at 00:59

0 Answers0