Skip to main content
Answered

React Native + Expo: Push notification deep links do not open correct link

  • September 10, 2024
  • 1 reply
  • 277 views

Hi! We’re are currently setting up Intercom in our React native + Expo application. Everything regarding push notifications is working. We can receive push notifications on both android and iOS platforms. However, deep link are only working on iOS.  

Our intent filter is as follows:

const BASE_MW_INTENT = {
  autoVerify: true,
  action: "VIEW",
  category: ["BROWSABLE", "DEFAULT"],
};

const MW_ANDROID_INTENT_FILTERS = [
  // Deep links config.
  {
    ...BASE_MW_INTENT,
    data: [
      {
        scheme: "ourcompany",
        host: "ourcompany.site.nl",
      },
    ],
  },
  // Universal links config.
  {
    ...BASE_MW_INTENT,
    data: UNIVERSAL_LINKS_DATA,
  },
];

 

And our deep link is as follows:

ourcompany://ourcompany.site.nl/mijn/account/abonnement

This again works on iOS, but not on android. The following also do not work:

ourcompany://ourcompany.nl/mijn/account/abonnement
https://ourcompany.nl/mijn/account/abonnement

Which are all valid urls for our app. Launching any of these via the abd CLI does work, and opens the correct url in our app:

adb shell am start -a android.intent.action.VIEW -d "ourcompany://ourcompany.site.nl/mijn/account/abonnement"

The following snippet also logs a correct url when launched via adb CLI, but “null” when opened via the Android push notification:

  React.useEffect(() => {
    const doWait = (ev) => {
      console.warn({ ev });
    };
    Linking.addEventListener("url", doWait);
    return () => Linking.removeAllListeners("url");
  }, []);

Please help us :)

Best answer by Ebenezer.Laleye

Hi @fabioshub ! Ebenezer here from Engineering Support👋.

What version of the Android SDK are you using currently use.

Also, can you confirm that you are including code below in your app? This is coming from our docs here.

277404599-0eadb23f-6c1b-48ba-b631-fdf55a431658_png__1460%C3%97664_.png?expires=1727185500&signature=b44e59513570d0d064f91aaa5dd411e45af2229848b0e7f7530f2cc8a7f95462&req=fSAiEcl7mYlfFb4f3HP0gA%2Fv%2BDScDpu75YczOGSqEgeR%0A&resize=516x

View original
Did this topic help you find an answer to your question?

1 reply

Forum|alt.badge.img+4
  • Intercom Team
  • 187 replies
  • Answer
  • September 24, 2024

Hi @fabioshub ! Ebenezer here from Engineering Support👋.

What version of the Android SDK are you using currently use.

Also, can you confirm that you are including code below in your app? This is coming from our docs here.

277404599-0eadb23f-6c1b-48ba-b631-fdf55a431658_png__1460%C3%97664_.png?expires=1727185500&signature=b44e59513570d0d064f91aaa5dd411e45af2229848b0e7f7530f2cc8a7f95462&req=fSAiEcl7mYlfFb4f3HP0gA%2Fv%2BDScDpu75YczOGSqEgeR%0A&resize=516x


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings