简体   繁体   中英

Android - How do I get referrer information on app reopen?

I have ads for my application but some users who click the ads already have my app installed.

If I visit the store after my app is already installed and click "open", the app's code is unable to read the referrer information and instead I see this message in the logcat:

12-15 18:27:27.334  32092-32092/? D/Finsky﹕ [1] 1.run: Dropped referrer for com.xxx.test because already-installed

Is there any way to read the referrer information when the app is re-openend from the store and not on first run?

The way to get referrer information for ads that link to your app if it's already installed is to use deep universal links instead. Such links do not directly go to Play Store, but rather point to your server (eg https://www.nimo.com ) which can redirect to Play Store. The trick is that your app will declare a handler for https://www.nimo.com and treat such links (with referral) locally.

A related question has been answered here .

Some commercial solutions provide this redirection service to you, eg Adjust.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM