Launch the application, if installed, or open Google Play using the referrer installation

We are trying to create a link that, when clicked in a browser, opens our application, if installed. This is usually done using the following:

intent://some.domain/some=parameters#Intent;scheme=somescheme;package=my.package.name 

If it is configured correctly, this uri can launch your application, if installed, and redirect you to the play store otherwise. However, this is not what we want. We want to redirect to the playback store using the installation referrer . As far as we know, the syntax of intent: // cannot do this.

Another decision we came up with was to make

 market://details?id=my.package.name&referrer=somereferrer 

can open with our application. The problem with this method is that it will not automatically launch the application, but will ask the user if they want to open a link with our application or in the Play Store.

Any workaround for this? Even a small suggestion would be appreciated.

+9
source share
3 answers

I think this is your answer fooobar.com/questions/195571 / ... Basically you should implement an intent filter like this:

 <data android:scheme="https" android:host="www.foo.com" android:pathPrefix="/bar" /> 

and on the server side, create a redirect rule on Google Play. For example, https://www.foo.com/bar/BlahBlah redirects to https://play.google.com/store/apps/details?id=com.bar.foo&referrer=BlahBlah .

+8
source

I am not sure that 100% understood your question. I am trying to reformulate: you want your link to be redirected to your application if it is installed without selecting "open with".

One solution if you are developing for the new Android M is to use the app link: here . But then again, I'm not sure if this is what you want.

0
source

There is a way to create a dynamic link using Firebase. Check out the Firebase white paper for how we can create dynamic / public links. Please check this and after, let me know if you have any questions regarding this.

-2
source

Source: https://habr.com/ru/post/984416/


All Articles