Android How to pass referrer to play store with intent

1.1k views Asked by At

we are trying to create a deep link from our website to app. If the app is not installed then user should be taken to the play store and after installing the app he should proceed to location of the deep link.

Key to this is sending referrer query parameter to store (market://details?id=package&referrer=encodedDeeplink) and then process INSTALL_REFERRER in the app. This solution wasn't problem some time ago, but since chrome 25 this kind of auto deep linking doesn't work. You have to use Intent uri instead rather than direct link to play store.

Intent uri should look like this:

intent://yourHost/yourPath#Intent;scheme=yourScheme;package=yourPackage;end

And when you call this, the chrome browser app checks if the app is installed (I assume with package info) and if so then intent with data = scheme://yourHost/yourPath is launched. However if the app is not installed then it opens play store for given package name.

My question is: Is there any way how to pass that referrer parameter to play store via intent uri? Need some way how to tell chrome to open store this way.

Thank you

1

There are 1 answers

2
Piyush On

There is no direct answer, there has to be mechanism at your server end to perform this.Meaning you have to save the newly register app via service and pull or push the data to app as you are installing a new application.