5

When testing deeplinks on android when the app is installed, the link opens the Play Store.

When I click 'Open', the app does open in the correct location, i.e. the deeplink does work. However, I don't want the user to go through Play Store for no reason.

Yossi Shasho
  • 3,632
  • 31
  • 47

4 Answers4

5

I contacted Branch.io's support with this question. Here's the answer I got from them, which was correct:

The issue you described is one I've run into. Because we don't know (with 100% accuracy) whether a user already has MyApp installed until they open the app from a Branch link, we wait until that's happened before deeplinking them directly into the app (and in the meantime, we send them to the app store).

There is, however, a setting that you can use to change this behavior. In settings/link settings in your Branch dashboard, there's a checkbox at the top of the page with the text "Always try to open app." If you check this box, we will automatically fire your URI scheme when a link is clicked, which means that even users who haven't opened MyApp from a Branch link (but who do have the app installed) will be deeplinked.

(I replaced my app's name with 'MyApp')

Community
  • 1
  • 1
Yossi Shasho
  • 3,632
  • 31
  • 47
  • `Always try to open app` doesn't solve the problem for me. According to my tests, it seems the problem only occur using the link from Chrome. In that case, I can see the following message in Android Monitor: `com.my.app is installed but certificate mistmatch` – fralbo Jun 12 '17 at 06:37
1

Only having had one call with Branch.io, I am not terribly familiar with its architecture, however, I believe it depends upon your app having its own URL scheme such as twitter:// or fb://.

Luckily, there is a cordova plugin for this. It sounds like Branch is doing a GET on that link, and not receiving anything back, so it's redirecting you to your app's Play Store URL.

If you already have this installed, I would recommend testing the plugin alone to make sure you have it configured correctly (try testing your own generated link). If it is still not working, see if Branch has this app URL configured correctly.

If that still fails, I would contact Branch about some cordova example code and troubleshooting options: I know they specifically mentioned it when I talked to them.

tabrindle
  • 1,854
  • 18
  • 18
1

The underlying issue (regardless if it's a native Android app or Cordova) with Chrome is that unless your AndroidManifest.xml matches exactly with the intent-string Chrome needs, it'll default to the play store instead of opting to trying to open the app. And it does it quite frequently.

I've answered the question previously over here on what you need. In case you don't want to go there, I'll copy and paste the TL;DR here:

Make sure these match on Branch dashboard and Manifest:

  • package name on branch dashboard is the same as your app build's
  • android:host="open" on Activity, because Branch formats intent strings as scheme://open
  • URI scheme registered on Branch is the same that's found in your AndroidManifest.xml
  • The same Activity has the following property: android.intent.category.BROWSABLE
Sahil Verma
  • 517
  • 2
  • 5
  • It wasn't the problem, but thanks to your answer we started monitoring the net activity on android and found a different issue – Yossi Shasho Sep 02 '15 at 13:32
0

In the LinkProperties object of branch use the control parameter $android_deeplink_path and put value <your custom host> like abcd.app.link. Then it will redirect to your app instantly,play store will not open.

Koustuv Ganguly
  • 897
  • 7
  • 21
  • @koustuv-gangly Could you please precise the **control parameter** you are talking about? – fralbo Jun 12 '17 at 06:32
  • In the LinkProperties object of branch put key as '$android_deeplink_path' value as '' like 'abcd.app.link' follow this link [link](https://dev.branch.io/getting-started/configuring-links/guide/) – Koustuv Ganguly Jun 13 '17 at 16:06