-2

Objective : I have 2 apps (Say A & B).

Case 1: When app B is installed and I launch a page (say product page) on app A it will land to same product page of app B.

Case 2: When app B is not present and I launched it from app A it will land to play store and and after installing it will open the same launched page of app A in app B.

I have followed https://developers.google.com/analytics/devguides/collection/android/v4/campaigns#google-play-url-builder but unfortunately didn't get any success.

I want to create it without any third party library like branch/facebook etc.

Please suggest something.

1 Answers1

2

What you're describing is called Deferred Deep Linking (Deep Linking refers to using a link to open your app directly to a specific piece of content, and Deferred means that it works even if the app isn't installed first).

Unfortunately there's no native way to accomplish this on either iOS or Android. The Google Play INSTALL_REFERRER could work in theory, but it's unreliable and often gets delivered too late (i.e., seconds to minutes of waiting) to provide a good UX. URL schemes don't work, because they always fail with an error if the app isn't installed. Universal Links in iOS 9+ and App Links on Android 6+ at least don't trigger an error if the app isn't installed, but you'd still have to handle redirecting the user from your website to the App Store. You still can't pass context through to the app after install with Universal Links and App Links, so you wouldn't be able to send the user to the correct item.

To make this work, you need a remote server to close the loop. You can build this yourself, but you really shouldn't for a lot of reasons, not the least of which being you have more important things to do. Free services like Branch.io (full disclosure: they're so awesome I work with them) and Firebase Dynamic Links exist precisely to handle all of this for you, and we have a number of partners who build app-to-app connections like this.

I'd love to hear any feedback on why you are hesitant to use a third-party library!

Alex Bauer
  • 13,147
  • 1
  • 27
  • 44