3

I have a react-native app and I'm trying to "redirect" user to another screen(based on url received from a deep linking", for example, if an user is on Screen A, then exits the app, clicks on the link, Screen A opens up and from Screen A the user should be redirected to the screen B. I'm getting the deep link on the screen A but can't redirect user to Screen B on android. My code:

Linking.openURL(deepLink)

The deeplink has this structure:

myApp://mainPage/address

When I use Linking.canOpenURL => it throws an error. I can't seem to figure out what I'm doing wrong, any suggestion is appreciated.thank you

1 Answer 1

0

Solved: posting here in case anyone else runs into the same issue - I changed Linking.openURL(deepLink) to branch.openURL(deepLink) and it worked

Sign up to request clarification or add additional context in comments.

4 Comments

what's branch here? It's not clear.
@justbecause probably branch.io
Where did you get branch from?
what is branch???????? I can't find it on react native nor react navigation

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.