Reputation: 71
I have an application that allow user to download an android app(any random app) from Google play store. Now, I want to store the information(in my database) that a particular application is downloaded from my application and not directly from play store.
I tried using few checks on back press(like enabling or disabling of flag when we come back from play) but they fail in some scenarios like download failed or slow download etc.
Please help me out solving this major issue.
Upvotes: 3
Views: 1430
Reputation: 1145
just use com.android.vending
I use this in my React native project
here is the reference : link
Upvotes: 0
Reputation: 13826
This is known as a referral check, app developers use it for things like checking if the app was installed from an ad. You can find more details about the Play installer API here and the library for using it here
3rd party applications which do this (eg advertisers or rewards apps) will normally co-operate with the app developer to include some code in their app. The referral code check then runs in the App developer's app, not the 3rd party app.
Upvotes: 2