avioli / uni_links

Flutter plugin for accepting incoming links.
BSD 2-Clause "Simplified" License
563 stars 303 forks source link

AppLink is not working when come from play store #89

Open RalphNoel opened 3 years ago

RalphNoel commented 3 years ago

Hi,

We are generated the app link URL like https://play.google.com/store/apps/details?id={{APP ID HERE}}&referrer={{REFERRAL ID HERE}}. and it's goes to via play store app or browser then install and open to the app, I can't get the REFERRAL ID.

kateile commented 3 years ago

Try leading here may be you may get some tips here

RalphNoel commented 3 years ago

Do you have any other idea to achieve this? @kateile

ajain-bst commented 3 years ago

bumping this for visibility @kateile

ManuLpz4 commented 3 years ago

You need to use the market scheme like:

Suggestion: use your app id (com.example.app) to name your scheme.

Link

market://details?id=[YOUR APP ID]&url=[YOUR CUSTOM SCHEME]%3A%2F%2F[YOUR CUSTOM HOST]&referrer=[YOUR REFERRAL ID]

AndroidManifest.xml

<intent-filter>
  <action android:name="android.intent.action.VIEW" />
  <category android:name="android.intent.category.DEFAULT" />
  <category android:name="android.intent.category.BROWSABLE" />
  <data
      android:scheme="[YOUR CUSTOM SCHEME]"
      android:host="[YOUR CUSTOM HOST]" />
  </intent-filter>
simplenotezy commented 1 year ago

@ManuLpz4 what do you need to do in the flutter code in order to get the referrer?

simplenotezy commented 1 year ago

Try leading here may be you may get some tips here

The article you linked to mentions:

referrer will trigger a com.android.vending.INSTALL_REFERRER Broadcast once the app is installed.

How do we read this using uni_links?

FeelHippo commented 1 year ago

Hi there, I am also investigating how to read the full referrer from the stores (including utm links), but I don't seem to be able to determine if this package can do that. Your help will be much appreciated :)

@simplenotezy did you by any chance find out how to achieve this, eventually?