Linking.addEventListener url never fires in android if app in foreground

Please provide the following:

  1. SDK Version:40
  2. Platforms(Android/iOS/web/all):android
  3. Add the appropriate “Tag” based on what Expo library you have a question on.

The Linking.getInitialURL() is working correctly but once my app is opened in background, if I click on a link which redirect to my custom scheme my app will open but the Linking.listener will not trigger.
componentWillMount() {
Linking.getInitialURL().then((url) => {
if (url) {
Linking.addEventListener(‘url’, this.handleUrl);

componentWillUnmount() {
    Linking.removeEventListener('url', this.handleUrl);

handleUrl = (url) => {
    alert('url is : '+url);

Please help.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.