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.
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')
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With