Linking and Android (examples use exp://?)

As the final step of an OAuth grant flow, I’d like to redirect back into the app with a custom url.

On the WebBrowser doc page you link to examples (one from @notbrent) that use the exp:// url scheme. Although I see in XDE how I can change the settings to find a similar exp:// url for my app, I don’t fully understand the implications.

Is this used only in development or is it possible to use this for standalone apps as well?

I read on the react-native Linking page that Linking was only supported for iOS and that deep-linking on android requires registering an intent in the AndroidManifest.xml. If that’s true does this require a detach?

Thanks for expo!

Hello! I don’t have a lot of time to explain right now unfortunately, but I can point you to the solution.

The scheme key in exp.json (link to docs) allows you to specify the scheme to use for standalone app builds. So if your scheme was rboyd then when you do a standalone build (with exp build:android for example) you can redirect back to your app by using rboyd://whatever. When opening your project through the Expo client, you need to use the exp scheme. Expo.Constants.linkingUri is helpful to get a valid linking uri for the active project, eg: if you want to pass it to some service to tell it where to redirect you to. No detach necessary, it’s pretty simple!

Hope that helps!


Thanks for the reply. This worked.

I’m still confused if I ever need to integrate deep links with my app’s routing subsystem to target multiple pages, but as far as dismissing the WebBrowser component this worked great. Thanks again.

Is there also a way to handle universal links/additional android https schemes with custom domain or would that require detaching?


@notbrent How can I redirect URI ? The problem is still appears in 31 SDK.

I have ejected expo app and now when I build release, it’s still using that exp:/// instead custom scheme( which is specified in app.json ) to open file with my app

1 Like