1

We want a user to complete their profile, so an in-app message pops up and if they accept, it redirects them to the edit profile page. It's working, but it redirects to the browser, comes back the app, and then completes the navigation to the profile page. Is there a way to cut out the browser redirect?

enter image description here

I tried setting the intent-filter in the AndroidManifest.xml

<intent-filter>
    <data android:host="@string/firebaseDynamicLinkDomain" android:scheme="http"/>
    <data android:host="@string/firebaseDynamicLinkDomain" android:scheme="https"/>
</intent-filter>

Here's where we initialize

export const initialize = async () => {
  try {
    disposeOnLink = dynamicLinks().onLink(handleLink);
  } catch (e) {
    throw e;
  }
};

and then handle the link

const handleLink = (link: string) => {
    if (link.url === 'https://mykomae.page.link/edit-profile') {
      navigateToEditProfile('profile');
    }
};

So it's functional but it looks awful and I'm hoping to avoid this behavior.

Adam
  • 321
  • 1
  • 3
  • 14

1 Answers1

1

This has been a while since you posted but I think you might be missing an intent filter. Just replace example.com with your domain and it should work.

https://firebase.google.com/docs/dynamic-links/android/receive#add-an-intent-filter-for-deep-links

<intent-filter>
  <action android:name="android.intent.action.VIEW"/>
  <category android:name="android.intent.category.DEFAULT"/>
  <category android:name="android.intent.category.BROWSABLE"/>
  <data
    android:host="example.com"
    android:scheme="https"/>
</intent-filter>
Adam
  • 350
  • 1
  • 5
  • 15